function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t+~]|"+Y+")"+Y+"*"),V=new RegExp(Y+"|>"),W=new RegExp(R),U=new RegExp("^"+F+"$"),G={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Y+"*(even|odd|(([+-]|)(\\d*)n|)"+Y+"*(?:([+-]|)"+Y+"*(\\d+)|))"+Y+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+Y+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Y+"*((?:-\\d)?\\d*)"+Y+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+Y+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},se=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{N.apply(O=I.call(_.childNodes),_.childNodes)}catch(t){N={apply:O.length?function(e,t){$.apply(e,I.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ae(e,t,i,r){var o,a,c,u,d,f,v,y=t&&t.ownerDocument,_=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return i;if(!r&&(h(t),t=t||p,m)){if(11!==_&&(d=J.exec(e)))if(o=d[1]){if(9===_){if(!(c=t.getElementById(o)))return i;if(c.id===o)return i.push(c),i}else if(y&&(c=y.getElementById(o))&&w(t,c)&&c.id===o)return i.push(c),i}else{if(d[2])return N.apply(i,t.getElementsByTagName(e)),i;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!D[e+" "]&&(!g||!g.test(e))&&(1!==_||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===_&&(V.test(e)||q.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(ie,re):t.setAttribute("id",u=b)),a=(f=s(e)).length;a--;)f[a]=(u?"#"+u:":scope")+" "+we(f[a]);v=f.join(",")}try{return N.apply(i,y.querySelectorAll(v)),i}catch(t){D(e,!0)}finally{u===b&&t.removeAttribute("id")}}}return l(e.replace(H,"$1"),t,i,r)}function le(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ce(e){return e[b]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=t}function he(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!X.test(e.namespaceURI||t&&t.nodeName||"HTML")},h=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:_;return s!=p&&9===s.nodeType&&s.documentElement&&(f=(p=s).documentElement,m=!o(p),_!=p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),n.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(p.getElementsByClassName),n.getById=ue((function(e){return f.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length})),n.getById?(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Q.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+Y+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+Y+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+Y+"*name"+Y+"*="+Y+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+Y+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Q.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",R)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(f.compareDocumentPosition),w=t||Q.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e==p||e.ownerDocument==_&&w(_,e)?-1:t==p||t.ownerDocument==_&&w(_,t)?1:u?P(u,e)-P(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e==p?-1:t==p?1:r?-1:o?1:u?P(u,e)-P(u,t):0;if(r===o)return he(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?he(s[i],a[i]):s[i]==_?-1:a[i]==_?1:0}),p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!D[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){D(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+Y+")"+e+"("+Y+"|$)"))&&C(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var r=ae.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(e,t,n){return f(t)?_.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?_.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?_.grep(e,(function(e){return-1)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||O,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:M.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(_.merge(this,_.parseHTML(i[1],(t=t instanceof _?t[0]:t)&&t.nodeType?t.ownerDocument||t:g,!0)),k.test(i[1])&&_.isPlainObject(t))for(i in t)f(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=g.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,O=_(g);var $=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i;ue=g.createDocumentFragment().appendChild(g.createElement("div")),(de=g.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),p.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="",p.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="",p.option=!!ue.lastChild;var me={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?_.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n",""]);var ye=/<|&#?\w+;/;function we(e,t,n,i,r){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p\s*$/g;function Me(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function $e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ne(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,i,r,o,s,a;if(1===t.nodeType){if(X.hasData(e)&&(a=X.get(e).events))for(r in X.remove(t,"handle events"),a)for(n=0,i=a[r].length;n").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Vt,Wt=[],Ut=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||_.expando+"_"+xt.guid++;return this[e]=!0,e}}),_.ajaxPrefilter("json jsonp",(function(t,n,i){var r,o,s,a=!1!==t.jsonp&&(Ut.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ut,"$1"+r):!1!==t.jsonp&&(t.url+=(Ct.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||_.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},i.always((function(){void 0===o?_(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,Wt.push(r)),s&&f(o)&&o(s[0]),s=o=void 0})),"script"})),p.createHTMLDocument=((Vt=g.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),_.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(p.createHTMLDocument?((i=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(i)):t=g),o=!n&&[],(r=k.exec(e))?[t.createElement(r[1])]:(r=we([e],t,o),o&&o.length&&_(o).remove(),_.merge([],r.childNodes)));var i,r,o},_.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return-1").append(_.parseHTML(e)).find(i):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},_.expr.pseudos.animated=function(e){return _.grep(_.timers,(function(t){return e===t.elem})).length},_.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=_.css(e,"position"),u=_(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=_.css(e,"top"),l=_.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(s=(i=u.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),f(t)&&(t=t.call(e,n,_.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},_.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){_.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?{top:(t=i.getBoundingClientRect()).top+(n=i.ownerDocument.defaultView).pageYOffset,left:t.left+n.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===_.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===_.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=_(e).offset()).top+=_.css(e,"borderTopWidth",!0),r.left+=_.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-_.css(i,"marginTop",!0),left:t.left-r.left-_.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===_.css(e,"position");)e=e.offsetParent;return e||ie}))}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;_.fn[e]=function(i){return H(this,(function(e,i,r){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r}),e,i,arguments.length)}})),_.each(["top","left"],(function(e,t){_.cssHooks[t]=He(p.pixelPosition,(function(e,n){if(n)return n=ze(e,t),Ye.test(n)?_(e).position()[t]+"px":n}))})),_.each({Height:"height",Width:"width"},(function(e,t){_.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){_.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return H(this,(function(t,n,r){var o;return m(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?_.css(t,n,a):_.style(t,n,r,a)}),t,s?r:void 0,s)}}))})),_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){_.fn[t]=function(e){return this.on(t,e)}})),_.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){_.fn[t]=function(e,n){return 0>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),n)},function(e){var n=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r,o=arguments.length>1?arguments[1]:void 0;if(void 0!==o){if(!t(o))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(r=arguments[2])}for(var s,a=i(n.length),l=t(this)?Object(new this(a)):new Array(a),c=0;c>>0;if(0===r)return!1;for(var o=0|t,s=Math.max(o>=0?o:r-Math.abs(o),0);s>>0,i=arguments.length>=2?arguments[1]:void 0,r=0;r>>0;if("function"!=typeof e)throw new TypeError;for(arguments.length>1&&(n=t),i=0;i1)return this.each((function(n,i){e(i).ripple(t)}));if(t=t||{},this.off(".ripple").data("unbound",!0),t.unbind)return this;var n=function(){return h&&!h.data("unbound")};this.addClass("legitRipple").removeData("unbound").on("tap.ripple",(function(t){n()||(h=e(this),w(t.coords))})).on("dragstart.ripple",(function(e){g.allowDragging||e.preventDefault()})),e(document).on("move.ripple",(function(e){n()&&b(e.coords)})).on("end.ripple",(function(){n()&&_()})),e(window).on("scroll.ripple",(function(e){n()&&_()}));var i,r,o,s,a=function(e){return!!e.type.match(/^touch/)},l=function(e,t){return a(e)&&(e=c(e.originalEvent.touches,t)),[e.pageX,e.pageY]},c=function(t,n){return e.makeArray(t).filter((function(e,t){return e.identifier==n}))[0]},u=0,d=function(e){"touchstart"==e.type&&(u=3),"scroll"==e.type&&(u=0);var t=u&&!a(e);return t&&u--,!t};this.on("mousedown.ripple touchstart.ripple",(function(t){d(t)&&(i=a(t)?t.originalEvent.changedTouches[0].identifier:-1,r=e(this),o=e.Event("tap",{coords:l(t,i)}),~i?s=setTimeout((function(){r.trigger(o),s=null}),g.touchDelay):r.trigger(o))})),e(document).on("mousemove.ripple touchmove.ripple mouseup.ripple touchend.ripple touchcancel.ripple",(function(t){var n=t.type.match(/move/);s&&!n&&(clearTimeout(s),s=null,r.trigger(o)),d(t)&&(a(t)?c(t.originalEvent.changedTouches,i):!~i)&&e(this).trigger(n?e.Event("move",{coords:l(t,i)}):"end")})).on("contextmenu.ripple",(function(e){d(e)})).on("touchmove",(function(){clearTimeout(s),s=null}));var h,p,f,m,g={},v=0,y=function(){e.each({fixedPos:null,get dragging(){return!g.fixedPos},get adaptPos(){return g.dragging},get maxDiameter(){return Math.sqrt(Math.pow(f[0],2)+Math.pow(f[1],2))/h.outerWidth()*Math.ceil(g.adaptPos?100:200)+"%"},scaleMode:"fixed",template:null,allowDragging:!1,touchDelay:100,callback:null},(function(e,n){g[e]=e in t?t[e]:n}))},w=function(t){f=[h.outerWidth(),h.outerHeight()],y(),m=t,p=e("").addClass("legitRipple-ripple"),g.template&&p.append(("object"==typeof g.template?g.template:h.children(".legitRipple-template").last()).clone().removeClass("legitRipple-template")).addClass("legitRipple-custom"),p.appendTo(h),E(t,!1);var n=p.css("transition-duration").split(","),i=[5.5*parseFloat(n[0])+"s"].concat(n.slice(1)).join(",");p.css("transition-duration",i).css("width",g.maxDiameter),p.on("transitionend webkitTransitionEnd oTransitionEnd",(function(){e(this).data("oneEnded")?e(this).off().remove():e(this).data("oneEnded",!0)}))},b=function(e){var t;if(v++,"proportional"===g.scaleMode){var n=Math.pow(v,v/100*.6);t=n>40?40:n}else if("fixed"==g.scaleMode&&Math.abs(e[1]-m[1])>6)return void _();E(e,t)},_=function(){p.css("width",p.css("width")).css("transition","none").css("transition","").css("width",p.css("width")).css("width",g.maxDiameter).css("opacity","0"),h=null,v=0},E=function(t,n){var i=[],r=!0===g.fixedPos?[.5,.5]:[(g.fixedPos?g.fixedPos[0]:t[0]-h.offset().left)/f[0],(g.fixedPos?g.fixedPos[1]:t[1]-h.offset().top)/f[1]],o=[.5-r[0],.5-r[1]],s=[100/parseFloat(g.maxDiameter),100/parseFloat(g.maxDiameter)*(f[1]/f[0])],a=[o[0]*s[0],o[1]*s[1]],l=g.dragging||0===v;if(l&&"inline"==h.css("display")){var c=e("").text("Hi!").css("font-size",0).prependTo(h),u=c.offset().left;c.remove(),i=[t[0]-u+"px",t[1]-h.offset().top+"px"]}l&&p.css("left",i[0]||100*r[0]+"%").css("top",i[1]||100*r[1]+"%"),p.css("transform","translate3d(-50%, -50%, 0)"+(g.adaptPos?"translate3d("+100*a[0]+"%, "+100*a[1]+"%, 0)":"")+(n?"scale("+n+")":"")),g.callback&&g.callback(h,p,r,g.maxDiameter)};return this},e.ripple=function(t){e.each(t,(function(t,n){e(t).ripple(n)}))},e.ripple.destroy=function(){e(".legitRipple").removeClass("legitRipple").add(window).add(document).off(".ripple"),e(".legitRipple-ripple").remove()}}(jQuery);var _slice=Array.prototype.slice,_slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_extends=Object.assign||function(e){for(var t=1;t1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var n=new e;return e.prototype=null,n}}(),_SubmitSelector:'input[type="submit"], button:submit'},s={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'
    ',errorTemplate:"
  • "},a=function(){this.__id__=o.generateID()};a.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,n=function(){var n=e.Deferred();return!0!==t.validationResult&&n.reject(),n.resolve().promise()};return[n,n]},actualizeOptions:function(){return o.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){for(var t in this.domOptions=o.objectCreate(this.parent.options),this.options=o.objectCreate(this.domOptions),e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){return this._listeners=this._listeners||{},(this._listeners[e]=this._listeners[e]||[]).push(t),this},subscribe:function(t,n){e.listenTo(this,t.toLowerCase(),n)},off:function(e,t){var n=this._listeners&&this._listeners[e];if(n)if(t)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1);else delete this._listeners[e];return this},unsubscribe:function(t,n){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,n){t=t||this;var i,r=this._listeners&&this._listeners[e];if(r)for(var o=r.length;o--;)if(!1===(i=r[o].call(t,t,n)))return i;return!this.parent||this.parent.trigger(e,t,n)},asyncIsValid:function(e,t){return o.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var l=function(t){e.extend(!0,this,t)};l.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var n=arguments[arguments.length-1];if(this.validateDate&&n._isDateInput())return arguments[0]=o.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,n){if("string"!=typeof t)return Array.isArray(t)?t:[t];var i=this.requirementType;if(Array.isArray(i)){for(var r=function(e,t){var n=e.match(/^\s*\[(.*)\]\s*$/);if(!n)throw'Requirement is not an array: "'+e+'"';var i=n[1].split(",").map(o.trimString);if(i.length!==t)throw"Requirement has "+i.length+" values when "+t+" are needed";return i}(t,i.length),s=0;s1?i-1:0),s=1;s0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=n.step,r=void 0===i?"any":i,o=n.base,s=void 0===o?0:o,a=u[t];if(!a)throw new Error("validator type `"+t+"` is not supported");if(!a.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),c=Math.max(d(r),d(s));if(d(l)>c)return!1;var h=function(e){return Math.round(e*Math.pow(10,c))};if((h(l)-h(s))%h(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,n){return e.length>=t&&e.length<=n},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,n){return e.length>=t&&e.length<=n},requirementType:["integer","integer"],priority:30},min:p((function(e,t){return e>=t})),max:p((function(e,t){return e<=t})),range:p((function(e,t,n){return e>=t&&e<=n})),equalto:{validateString:function(t,n){var i=e(n);return i.length?t===i.val():t===n},priority:256}}};var f={};f.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",(function(t){e.onSubmitValidate(t)})),this.$element.on("click.Parsley",o._SubmitSelector,(function(t){e.onSubmitButton(t)})),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e0&&void 0===t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},f.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=function e(t,n,i){for(var r=[],o=[],s=0;s0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var n=0;n').appendTo(this.$element)),n.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){o.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var n=_slice.call(arguments);t={group:n[0],force:n[1],event:n[2]}}return g[this.whenValidate(t).state()]},whenValidate:function(){var t,n=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=i.group,s=i.force,a=i.event;this.submitEvent=a,a&&(this.submitEvent=_extends({},a,{preventDefault:function(){o.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),n.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions((function(){return e.map(n.fields,(function(e){return e.whenValidate({force:s,group:r})}))}));return(t=o.all(l).done((function(){n._trigger("success")})).fail((function(){n.validationResult=!1,n.focus(),n._trigger("error")})).always((function(){n._trigger("validated")}))).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){o.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var n=_slice.call(arguments);t={group:n[0],force:n[1]}}return g[this.whenValid(t).state()]},whenValid:function(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.group,r=n.force;this._refreshFields();var s=this._withoutReactualizingFormOptions((function(){return e.map(t.fields,(function(e){return e.whenValid({group:i,force:r})}))}));return o.all(s)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var e=0;e=1&&!e.isPlainObject(t)&&(o.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var n=this.whenValidate(t);if(!n)return!0;switch(n.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.force,r=n.group;if(this.refresh(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:i,value:this.value,_refreshed:!0}).always((function(){t._reflowUI()})).done((function(){t._trigger("success")})).fail((function(){t._trigger("error")})).always((function(){t._trigger("validated")}))).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return void 0===e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){o.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var n=_slice.call(arguments);t={force:n[0],value:n[1]}}var i=this.whenValid(t);return!i||w[i.state()]},whenValid:function(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.force,r=void 0!==i&&i,s=n.value,a=n.group;if(n._refreshed||this.refresh(),!a||this._isInGroup(a)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if(null!=s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var l=this._getGroupedConstraints(),c=[];return e.each(l,(function(n,i){var r=o.all(e.map(i,(function(e){return t._validateConstraint(s,e)})));if(c.push(r),"rejected"===r.state())return!1})),o.all(c)}},_validateConstraint:function(t,n){var i=this,r=n.validate(t,this);return!1===r&&(r=e.Deferred().reject()),o.all([r]).fail((function(e){i.validationResult instanceof Array||(i.validationResult=[]),i.validationResult.push({assert:n,errorMessage:"string"==typeof e&&e})}))},getValue:function(){var e;return null==(e="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val())?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return o.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(e,t,n,i){if(window.Parsley._validatorRegistry.validators[e]){var r=new v(this,e,t,n,i);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t1){var n=[];return this.each((function(){n.push(e(this).parsley(t))})),n}if(0!=this.length)return new E(this[0],t)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),C.options=_extends(o.objectCreate(s),window.ParsleyConfig),window.ParsleyConfig=C.options,window.Parsley=window.psly=C,C.Utils=o,window.ParsleyUtils={},e.each(o,(function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return o.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),o[e].apply(o,arguments)})}));var S=window.Parsley._validatorRegistry=new c(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),(function(e,t){window.Parsley[t]=function(){return S[t].apply(S,arguments)},window.ParsleyValidator[t]=function(){var e;return o.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}})),window.Parsley.UI=f,window.ParsleyUI={removeError:function(e,t,n){var i=!0!==n;return o.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:i})},getErrorsMessages:function(e){return o.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),(function(e,t){window.ParsleyUI[t]=function(e,n,i,r,s){var a=!0!==s;return o.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](n,{message:i,assert:r,updateClass:a})}})),!1!==window.ParsleyConfig.autoBind&&e((function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()}));var T=e({}),D=function(){o.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},k="parsley:";return e.listen=function(e,i){var r;if(D(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],i=arguments[2]),"function"!=typeof i)throw new Error("Wrong parameters");window.Parsley.on(n(e),t(i,r))},e.listenTo=function(e,i,r){if(D(),!(e instanceof b||e instanceof m))throw new Error("Must give Parsley instance");if("string"!=typeof i||"function"!=typeof r)throw new Error("Wrong parameters");e.on(n(i),t(r))},e.unsubscribe=function(e,t){if(D(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(n(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(D(),!(e instanceof b||e instanceof m))throw new Error("Must give Parsley instance");e.off(n(t))},e.unsubscribeAll=function(t){D(),window.Parsley.off(n(t)),e("form,input,textarea,select").each((function(){var i=e(this).data("Parsley");i&&i.off(n(t))}))},e.emit=function(e,t){var i;D();var r=t instanceof b||t instanceof m,o=Array.prototype.slice.call(arguments,r?2:1);o.unshift(n(e)),r||(t=window.Parsley),(i=t).trigger.apply(i,_toConsumableArray(o))},e.extend(!0,C,{asyncValidators:{default:{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,n,i){return C.asyncValidators[e]={fn:t,url:n||!1,options:i||{}},this}}),C.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,n,i,r){var o,s,a={},l=i.validator||(!0===i.reverse?"reverse":"default");if(void 0===C.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");(n=C.asyncValidators[l].url||n).indexOf("{value}")>-1?n=n.replace("{value}",encodeURIComponent(t)):a[r.element.getAttribute("name")||r.element.getAttribute("id")]=t;var c=e.extend(!0,i.options||{},C.asyncValidators[l].options);o=e.extend(!0,{},{url:n,data:a,type:"GET"},c),r.trigger("field:ajaxoptions",r,o),s=e.param(o),void 0===C._remoteCache&&(C._remoteCache={});var u=C._remoteCache[s]=C._remoteCache[s]||e.ajax(o),d=function(){var t=C.asyncValidators[l].fn.call(r,u,n,i);return t||(t=e.Deferred().reject()),e.when(t)};return u.then(d,d)},priority:-1}),C.on("form:submit",(function(){C._remoteCache={}})),a.prototype.addAsyncValidator=function(){return o.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),C.addAsyncValidator.apply(C,arguments)},C.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),C.setLocale("en"),(new function(){var t=this,n=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&!1!==e.originalEvent.isTrusted},fakeInputEvent:function(n){t.isNativeEvent(n)&&e(n.target).trigger("input")},misbehaves:function(n){t.isNativeEvent(n)&&(t.behavesOk(n),e(document).on("change.inputevent",n.data.selector,t.fakeInputEvent),t.fakeInputEvent(n))},behavesOk:function(n){t.isNativeEvent(n)&&e(document).off("input.inputevent",n.data.selector,t.behavesOk).off("change.inputevent",n.data.selector,t.misbehaves)},install:function(){if(!n.inputEventPatched){n.inputEventPatched="0.0.3";for(var i=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;rthis._items.length-1||e<0))if(this._isSliding)t(this._element).one(I.SLID,(function(){return n.to(e)}));else{if(i===e)return this.pause(),void this.cycle();this._slide(i=n.clientWidth&&e.height>=n.clientHeight})),d=0l[e]&&!t.escapeWithReference&&(i=Math.min(c[n],l[e]-("right"===e?c.width:c.height))),ge({},n,i)}};return t.priority.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=ve({},c,u[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,i=t.reference,r=e.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]o(i[a])&&(e.offsets.popper[l]=o(i[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Le(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=e.offsets,s=o.popper,a=o.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),h=l?"left":"top",p=l?"bottom":"right",f=Se(i)[c];a[p]-fs[p]&&(e.offsets.popper[d]+=a[d]+f-s[p]),e.offsets.popper=ye(e.offsets.popper);var m=a[d]+a[c]/2-f/2,g=ne(e.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),w=m-e.offsets.popper[d]-v-y;return w=Math.max(Math.min(s[c]-f,w),0),e.arrowElement=i,e.offsets.arrow=(ge(n={},d,Math.round(w)),ge(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Oe(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Ee(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],r=Te(i),o=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case"flip":s=[i,r];break;case"clockwise":s=je(i);break;case"counterclockwise":s=je(i,!0);break;default:s=t.behavior}return s.forEach((function(a,l){if(i!==a||s.length===l+1)return e;i=e.placement.split("-")[0],r=Te(i);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,h="left"===i&&d(c.right)>d(u.left)||"right"===i&&d(c.left)d(u.top)||"bottom"===i&&d(c.top)d(n.right),m=d(c.top)d(n.bottom),v="left"===i&&p||"right"===i&&f||"top"===i&&m||"bottom"===i&&g,y=-1!==["top","bottom"].indexOf(i),w=!!t.flipVariations&&(y&&"start"===o&&p||y&&"end"===o&&f||!y&&"start"===o&&m||!y&&"end"===o&&g)||!!t.flipVariationsByContent&&(y&&"start"===o&&f||y&&"end"===o&&p||!y&&"start"===o&&g||!y&&"end"===o&&m);(h||v||w)&&(e.flipped=!0,(h||v)&&(i=s[l+1]),w&&(o="end"===o?"start":"start"===o?"end":o),e.placement=i+(o?"-"+o:""),e.offsets.popper=ve({},e.offsets.popper,De(e.instance.popper,e.offsets.reference,e.placement)),e=Ae(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,r=i.popper,o=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=o[n]-(a?r[s?"width":"height"]:0),e.placement=Te(t),e.offsets.popper=ye(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Le(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=ke(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomn.right||t.top>n.bottom||t.rightdocument.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=e.left+e.right
    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},$t="show",Nt={HIDE:"hide"+Ct,HIDDEN:"hidden"+Ct,SHOW:"show"+Ct,SHOWN:"shown"+Ct,INSERTED:"inserted"+Ct,CLICK:"click"+Ct,FOCUSIN:"focusin"+Ct,FOCUSOUT:"focusout"+Ct,MOUSEENTER:"mouseenter"+Ct,MOUSELEAVE:"mouseleave"+Ct},It="fade",Pt="show",Lt="hover",Yt="focus",Ft=function(){function e(e,t){if(void 0===ze)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var n=e.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(Pt))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=a.findShadowRoot(this.element),r=t.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!r)return;var o=this.getTipElement(),s=a.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(It);var l="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var u=this._getContainer();t(o).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(o).appendTo(u),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new ze(this.element,o,this._getPopperConfig(c)),t(o).addClass(Pt),"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);var d=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),"out"===n&&e._leave(null,e)};if(t(this.tip).hasClass(It)){var h=a.getTransitionDurationFromElement(this.tip);t(this.tip).one(a.TRANSITION_END,d).emulateTransitionEnd(h)}else d()}},n.hide=function(e){function n(){i._hoverState!==$t&&r.parentNode&&r.parentNode.removeChild(r),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),t(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),e&&e()}var i=this,r=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE);if(t(this.element).trigger(o),!o.isDefaultPrevented()){if(t(r).removeClass(Pt),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger.click=!1,this._activeTrigger[Yt]=!1,this._activeTrigger[Lt]=!1,t(this.tip).hasClass(It)){var s=a.getTransitionDurationFromElement(r);t(r).one(a.TRANSITION_END,n).emulateTransitionEnd(s)}else n();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(e){t(this.getTipElement()).addClass(Tt+"-"+e)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var e=this.getTipElement();this.setElementContent(t(e.querySelectorAll(".tooltip-inner")),this.getTitle()),t(e).removeClass(It+" "+Pt)},n.setElementContent=function(e,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=_t(n,this.config.whiteList,this.config.sanitizeFn)),e.html(n)):e.text(n):this.config.html?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text())},n.getTitle=function(){return this.element.getAttribute("data-original-title")||("function"==typeof this.config.title?this.config.title.call(this.element):this.config.title)},n._getPopperConfig=function(e){var t=this;return o({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},{},this.config.popperConfig)},n._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=o({},t.offsets,{},e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},n._getContainer=function(){return!1===this.config.container?document.body:a.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(e){return Ot[e.toUpperCase()]},n._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if("manual"!==n){var i=n===Lt?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===Lt?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,(function(t){return e._enter(t)})).on(r,e.config.selector,(function(t){return e._leave(t)}))}})),this._hideModalHandler=function(){e.element&&e.hide()},t(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=o({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");!this.element.getAttribute("title")&&"string"==e||(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?Yt:Lt]=!0),t(n.getTipElement()).hasClass(Pt)||n._hoverState===$t?n._hoverState=$t:(clearTimeout(n._timeout),n._hoverState=$t,n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){n._hoverState===$t&&n.show()}),n.config.delay.show):n.show())},n._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?Yt:Lt]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},n._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},n._getConfig=function(e){var n=t(this.element).data();return Object.keys(n).forEach((function(e){-1!==kt.indexOf(e)&&delete n[e]})),"number"==typeof(e=o({},this.constructor.Default,{},n,{},"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),a.typeCheckConfig(Et,e,this.constructor.DefaultType),e.sanitize&&(e.template=_t(e.template,e.whiteList,e.sanitizeFn)),e},n._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},n._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(Dt);null!==n&&n.length&&e.removeClass(n.join(""))},n._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},n._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(It),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},e._jQueryInterface=function(n){return this.each((function(){var i=t(this).data(xt),r="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new e(this,r),t(this).data(xt,i)),"string"==typeof n)){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return Mt}},{key:"NAME",get:function(){return Et}},{key:"DATA_KEY",get:function(){return xt}},{key:"Event",get:function(){return Nt}},{key:"EVENT_KEY",get:function(){return Ct}},{key:"DefaultType",get:function(){return At}}]),e}();t.fn[Et]=Ft._jQueryInterface,t.fn[Et].Constructor=Ft,t.fn[Et].noConflict=function(){return t.fn[Et]=St,Ft._jQueryInterface};var jt="popover",Rt="bs.popover",zt="."+Rt,Ht=t.fn[jt],Bt="bs-popover",qt=new RegExp("(^|\\s)"+Bt+"\\S+","g"),Vt=o({},Ft.Default,{placement:"right",trigger:"click",content:"",template:''}),Wt=o({},Ft.DefaultType,{content:"(string|element|function)"}),Ut={HIDE:"hide"+zt,HIDDEN:"hidden"+zt,SHOW:"show"+zt,SHOWN:"shown"+zt,INSERTED:"inserted"+zt,CLICK:"click"+zt,FOCUSIN:"focusin"+zt,FOCUSOUT:"focusout"+zt,MOUSEENTER:"mouseenter"+zt,MOUSELEAVE:"mouseleave"+zt},Gt=function(e){function n(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(n,e);var r=n.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(e){t(this.getTipElement()).addClass(Bt+"-"+e)},r.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},r.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(".popover-body"),n),e.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(qt);null!==n&&0=this._offsets[r]&&(void 0===this._offsets[r+1]||e li > .active",gn=function(){function e(e){this._element=e}var n=e.prototype;return n.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(pn)||t(this._element).hasClass("disabled"))){var n,i,r=t(this._element).closest(".nav, .list-group")[0],o=a.getSelectorFromElement(this._element);if(r){var s="UL"===r.nodeName||"OL"===r.nodeName?mn:fn;i=(i=t.makeArray(t(r).find(s)))[i.length-1]}var l=t.Event(hn.HIDE,{relatedTarget:this._element}),c=t.Event(hn.SHOW,{relatedTarget:i});if(i&&t(i).trigger(l),t(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){o&&(n=document.querySelector(o)),this._activate(this._element,r);var u=function(){var n=t.Event(hn.HIDDEN,{relatedTarget:e._element}),r=t.Event(hn.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,u):u()}}},n.dispose=function(){t.removeData(this._element,cn),this._element=null},n._activate=function(e,n,i){function r(){return o._transitionComplete(e,s,i)}var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?t(n).children(fn):t(n).find(mn))[0],l=i&&s&&t(s).hasClass("fade");if(s&&l){var c=a.getTransitionDurationFromElement(s);t(s).removeClass("show").one(a.TRANSITION_END,r).emulateTransitionEnd(c)}else r()},n._transitionComplete=function(e,n,i){if(n){t(n).removeClass(pn);var r=t(n.parentNode).find("> .dropdown-menu .active")[0];r&&t(r).removeClass(pn),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(pn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),a.reflow(e),e.classList.contains("fade")&&e.classList.add("show"),e.parentNode&&t(e.parentNode).hasClass("dropdown-menu")){var o=t(e).closest(".dropdown")[0];if(o){var s=[].slice.call(o.querySelectorAll(".dropdown-toggle"));t(s).addClass(pn)}e.setAttribute("aria-expanded",!0)}i&&i()},e._jQueryInterface=function(n){return this.each((function(){var i=t(this),r=i.data(cn);if(r||(r=new e(this),i.data(cn,r)),"string"==typeof n){if(void 0===r[n])throw new TypeError('No method named "'+n+'"');r[n]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(hn.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(e){e.preventDefault(),gn._jQueryInterface.call(t(this),"show")})),t.fn.tab=gn._jQueryInterface,t.fn.tab.Constructor=gn,t.fn.tab.noConflict=function(){return t.fn.tab=dn,gn._jQueryInterface};var vn="toast",yn="bs.toast",wn="."+yn,bn=t.fn[vn],_n={CLICK_DISMISS:"click.dismiss"+wn,HIDE:"hide"+wn,HIDDEN:"hidden"+wn,SHOW:"show"+wn,SHOWN:"shown"+wn},En="show",xn="showing",Cn={animation:"boolean",autohide:"boolean",delay:"number"},Sn={animation:!0,autohide:!0,delay:500},Tn=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var n=e.prototype;return n.show=function(){var e=this,n=t.Event(_n.SHOW);if(t(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){e._element.classList.remove(xn),e._element.classList.add(En),t(e._element).trigger(_n.SHOWN),e._config.autohide&&(e._timeout=setTimeout((function(){e.hide()}),e._config.delay))};if(this._element.classList.remove("hide"),a.reflow(this._element),this._element.classList.add(xn),this._config.animation){var r=a.getTransitionDurationFromElement(this._element);t(this._element).one(a.TRANSITION_END,i).emulateTransitionEnd(r)}else i()}},n.hide=function(){if(this._element.classList.contains(En)){var e=t.Event(_n.HIDE);t(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(En)&&this._element.classList.remove(En),t(this._element).off(_n.CLICK_DISMISS),t.removeData(this._element,yn),this._element=null,this._config=null},n._getConfig=function(e){return e=o({},Sn,{},t(this._element).data(),{},"object"==typeof e&&e?e:{}),a.typeCheckConfig(vn,e,this.constructor.DefaultType),e},n._setListeners=function(){var e=this;t(this._element).on(_n.CLICK_DISMISS,'[data-dismiss="toast"]',(function(){return e.hide()}))},n._close=function(){function e(){n._element.classList.add("hide"),t(n._element).trigger(_n.HIDDEN)}var n=this;if(this._element.classList.remove(En),this._config.animation){var i=a.getTransitionDurationFromElement(this._element);t(this._element).one(a.TRANSITION_END,e).emulateTransitionEnd(i)}else e()},e._jQueryInterface=function(n){return this.each((function(){var i=t(this),r=i.data(yn);if(r||(r=new e(this,"object"==typeof n&&n),i.data(yn,r)),"string"==typeof n){if(void 0===r[n])throw new TypeError('No method named "'+n+'"');r[n](this)}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"DefaultType",get:function(){return Cn}},{key:"Default",get:function(){return Sn}}]),e}();t.fn[vn]=Tn._jQueryInterface,t.fn[vn].Constructor=Tn,t.fn[vn].noConflict=function(){return t.fn[vn]=bn,Tn._jQueryInterface},e.Alert=p,e.Button=C,e.Carousel=F,e.Collapse=Z,e.Dropdown=it,e.Modal=vt,e.Popover=Gt,e.Scrollspy=ln,e.Tab=gn,e.Toast=Tn,e.Tooltip=Ft,e.Util=a,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t,n,i){var r="accordion",o={transitionSpeed:300,transitionEasing:"ease",controlElement:"[data-control]",contentElement:"[data-content]",groupElement:"[data-accordion-group]",singleOpen:!0};function s(t,n){this.element=t,this.options=e.extend({},o,n),this._defaults=o,this._name=r,this.init()}s.prototype.init=function(){var i,r,o=this.options,s=e(this.element),a=s.find(o.controlElement+":first"),l=s.find(o.contentElement+":first"),c=s.parents("[data-accordion]").length>0,u={"max-height":0,overflow:"hidden"},d=function(){var e=(n.body||n.documentElement).style,t="transition";if("string"==typeof e[t])return!0;var i=["Moz","webkit","Webkit","Khtml","O","ms"];t="Transition";for(var r=0;r [data-content]"),l=a.find("[data-accordion].open > [data-content]");o.singleOpen||(l=l.not(n.siblings("[data-accordion].open").find("> [data-content]"))),s=a.add(l),t.hasClass("open")&&s.each((function(){var t=e(this).data("oHeight");switch(r){case"+":e(this).data("oHeight",t+i);break;case"-":e(this).data("oHeight",t-i);break;default:throw"updateParentHeight method needs an operation"}e(this).css("max-height",e(this).data("oHeight"))}))}function m(e){if(e.hasClass("open")){var t=e.find("> [data-content]"),n=t.find("[data-accordion].open > [data-content]"),i=t.add(n);p(i),i.css("max-height",i.data("oHeight"))}}function g(e,t){e.trigger("accordion.close"),d?(c&&f(e.parents("[data-accordion]"),e,t.data("oHeight"),"-"),t.css(u),e.removeClass("open")):(t.css("max-height",t.data("oHeight")),t.animate(u,o.transitionSpeed),e.removeClass("open"))}function v(e,n){var i;e.trigger("accordion.open"),d?(h(),c&&f(e.parents("[data-accordion]"),e,n.data("oHeight"),"+"),i=function(){n.css("max-height",n.data("oHeight"))},t.requestAnimationFrame?requestAnimationFrame(i):t.webkitRequestAnimationFrame?webkitRequestAnimationFrame(i):t.mozRequestAnimationFrame?mozRequestAnimationFrame(i):setTimeout(i,1e3/60),e.addClass("open")):(n.animate({"max-height":n.data("oHeight")},o.transitionSpeed,(function(){n.css({"max-height":"none"})})),e.addClass("open"))}function y(){var t=!!o.singleOpen&&s.parents(o.groupElement).length>0;p(l),t&&function(t){t.closest(o.groupElement);var n=t.siblings("[data-accordion]").filter(".open"),i=n.find("[data-accordion]").filter(".open"),r=n.add(i);r.each((function(){var t=e(this),n=t.find(o.contentElement);g(t,n)})),r.removeClass("open")}(s),s.hasClass("open")?g(s,l):v(s,l)}l.each((function(){var t=e(this);0!=t.css("max-height")&&(t.closest("[data-accordion]").hasClass("open")?(h(),p(t),t.css("max-height",t.data("oHeight"))):t.css({"max-height":0,overflow:"hidden"}))})),s.attr("data-accordion")||(s.attr("data-accordion",""),s.find(o.controlElement).attr("data-control",""),s.find(o.contentElement).attr("data-content","")),a.on("click",y),a.on("accordion.toggle",(function(){if(o.singleOpen&&a.length>1)return!1;y()})),a.on("accordion.refresh",(function(){m(s)})),e(t).on("resize",(i=function(){m(s)},function(){var e=this,t=arguments;r&&clearTimeout(r),r=setTimeout((function(){i.apply(e,t),r=null}),100)}))},e.fn[r]=function(t){return this.each((function(){e.data(this,"plugin_"+r)||e.data(this,"plugin_"+r,new s(this,t))}))}}(jQuery,window,document),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,(function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,i=[];for(n=0;n>>0,i=0;ife(e)?(o=e+1,s=a-fe(e)):(o=e,s=a),{year:o,dayOfYear:s}}function Ne(e,t,n){var i,r,o=Me(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?i=s+Ie(r=e.year()-1,t,n):s>Ie(e.year(),t,n)?(i=s-Ie(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function Ie(e,t,n){var i=Me(e,t,n),r=Me(e+1,t,n);return(fe(e)-i+r)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),$("week","w"),$("isoWeek","W"),L("week",5),L("isoWeek",5),le("w",K),le("ww",K,W),le("W",K),le("WW",K,W),pe(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=_(e)})),H("d",0,"do","day"),H("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),H("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),H("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),$("day","d"),$("weekday","e"),$("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),le("d",K),le("e",K),le("E",K),le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),le("dddd",(function(e,t){return t.weekdaysRegex(e)})),pe(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:h(n).invalidWeekday=e})),pe(["d","e","E"],(function(e,t,n,i){t[i]=_(e)}));var Pe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Le="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ye="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Fe=se,je=se,Re=se;function ze(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ue(a[t]),l[t]=ue(l[t]),c[t]=ue(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function He(){return this.hours()%12||12}function Be(e,t){H(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function qe(e,t){return t._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,He),H("k",["kk",2],0,(function(){return this.hours()||24})),H("hmm",0,0,(function(){return""+He.apply(this)+Y(this.minutes(),2)})),H("hmmss",0,0,(function(){return""+He.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),H("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),H("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),Be("a",!0),Be("A",!1),$("hour","h"),L("hour",13),le("a",qe),le("A",qe),le("H",K),le("h",K),le("k",K),le("HH",K,W),le("hh",K,W),le("kk",K,W),le("hmm",Z),le("hmmss",Q),le("Hmm",Z),le("Hmmss",Q),he(["H","HH"],3),he(["k","kk"],(function(e,t,n){var i=_(e);t[3]=24===i?0:i})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[3]=_(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var i=e.length-2;t[3]=_(e.substr(0,i)),t[4]=_(e.substr(i)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=_(e.substr(0,i)),t[4]=_(e.substr(i,2)),t[5]=_(e.substr(r)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var i=e.length-2;t[3]=_(e.substr(0,i)),t[4]=_(e.substr(i))})),he("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=_(e.substr(0,i)),t[4]=_(e.substr(i,2)),t[5]=_(e.substr(r))}));var Ve,We=ye("Hours",!0),Ue={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Ce,week:{dow:0,doy:6},weekdays:Pe,weekdaysMin:Ye,weekdaysShort:Le,meridiemParse:/[ap]\.?m?\.?/i},Ge={},Xe={};function Ke(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){var t=null;if(!Ge[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Ve._abbr,require("./locale/"+e),Qe(t)}catch(e){}return Ge[e]}function Qe(e,t){var n;return e&&((n=o(t)?et(e):Je(e,t))?Ve=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ve._abbr}function Je(e,t){if(null!==t){var n,i=Ue;if(t.abbr=e,null!=Ge[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Ge[e]._config;else if(null!=t.parentLocale)if(null!=Ge[t.parentLocale])i=Ge[t.parentLocale]._config;else{if(null==(n=Ze(t.parentLocale)))return Xe[t.parentLocale]||(Xe[t.parentLocale]=[]),Xe[t.parentLocale].push({name:e,config:t}),null;i=n._config}return Ge[e]=new O(A(i,t)),Xe[e]&&Xe[e].forEach((function(e){Je(e.name,e.config)})),Qe(e),Ge[e]}return delete Ge[e],null}function et(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ve;if(!i(e)){if(t=Ze(e))return t;e=[e]}return function(e){for(var t,n,i,r,o=0;o=t&&E(r,n,!0)>=t-1)break;t--}o++}return Ve}(e)}function tt(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||11_e(n[0],n[1])?2:n[3]<0||24Ie(n,o,s)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(a=$e(n,i,r,o,s),e._a[0]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=nt(e._a[0],r[0]),(e._dayOfYear>fe(s)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),i=Oe(s,0,e._dayOfYear),e._a[1]=i.getUTCMonth(),e._a[2]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Oe:function(e,t,n,i,r,o,s){var a=new Date(e,t,n,i,r,o,s);return e<100&&0<=e&&isFinite(a.getFullYear())&&a.setFullYear(e),a}).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var rt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ot=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,st=/Z|[+-]\d\d(?::?\d\d)?/,at=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],lt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ct=/^\/?Date\((\-?\d+)/i;function ut(e){var t,n,i,r,o,s,a=e._i,l=rt.exec(a)||ot.exec(a);if(l){for(h(e).iso=!0,t=0,n=at.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Qt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Qt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Qt.isUtc=Ot,Qt.isUTC=Ot,Qt.zoneAbbr=function(){return this._isUTC?"UTC":""},Qt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Qt.dates=C("dates accessor is deprecated. Use date instead.",Wt),Qt.months=C("months accessor is deprecated. Use month instead",Te),Qt.years=C("years accessor is deprecated. Use year instead",ve),Qt.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Qt.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=mt(e))._a){var t=e._isUTC?d(e._a):vt(e._a);this._isDSTShifted=this.isValid()&&0"+(e.autoclose||e.inline?"":'")+""},r=function(e,t,n){return new Date(1970,0,t).toLocaleString(e.lang,{weekday:n?"short":"long"})},o=function(n,i,r,o){if(r)return"
    ";i=e(i);var s=e(i).subtract(1,"month"),a=e(i).add(1,"month"),l={time:e(i).valueOf(),className:["lightpick__day","is-available"]};if(o instanceof Array||"[object Array]"===Object.prototype.toString.call(o)?(o=o.filter((function(e){return["lightpick__day","is-available","is-previous-month","is-next-month"].indexOf(e)>=0})),l.className=l.className.concat(o)):l.className.push(o),n.disableDates)for(var c=0;c=0&&(n.locale.tooltipOnDisabled&&(!n.startDate||i.isAfter(n.startDate)||n.startDate&&n.endDate)&&l.className.push("disabled-tooltip"),l.className.indexOf("is-start-date")>=0?(this.setStartDate(null),this.setEndDate(null)):l.className.indexOf("is-end-date")>=0&&this.setEndDate(null))}if(n.minDays&&n.startDate&&!n.endDate&&i.isBetween(e(n.startDate).subtract(n.minDays-1,"day"),e(n.startDate).add(n.minDays-1,"day"),"day")&&(l.className.push("is-disabled"),n.selectForward&&i.isSameOrAfter(n.startDate)&&(l.className.push("is-forward-selected"),l.className.push("is-in-range"))),n.maxDays&&n.startDate&&!n.endDate&&(i.isSameOrBefore(e(n.startDate).subtract(n.maxDays,"day"),"day")?l.className.push("is-disabled"):i.isSameOrAfter(e(n.startDate).add(n.maxDays,"day"),"day")&&l.className.push("is-disabled")),n.repick&&(n.minDays||n.maxDays)&&n.startDate&&n.endDate){var h=e(n.repickTrigger==n.field?n.endDate:n.startDate);n.minDays&&i.isBetween(e(h).subtract(n.minDays-1,"day"),e(h).add(n.minDays-1,"day"),"day")&&l.className.push("is-disabled"),n.maxDays&&(i.isSameOrBefore(e(h).subtract(n.maxDays,"day"),"day")?l.className.push("is-disabled"):i.isSameOrAfter(e(h).add(n.maxDays,"day"),"day")&&l.className.push("is-disabled"))}i.isSame(new Date,"day")&&l.className.push("is-today"),i.isSame(n.startDate,"day")&&l.className.push("is-start-date"),i.isSame(n.endDate,"day")&&l.className.push("is-end-date"),n.startDate&&n.endDate&&i.isBetween(n.startDate,n.endDate,"day","[]")&&l.className.push("is-in-range"),e().isSame(i,"month")||(s.isSame(i,"month")?l.className.push("is-previous-month"):a.isSame(i,"month")&&l.className.push("is-next-month")),n.minDate&&i.isBefore(n.minDate,"day")&&l.className.push("is-disabled"),n.maxDate&&i.isAfter(n.maxDate,"day")&&l.className.push("is-disabled"),n.selectForward&&!n.singleDate&&n.startDate&&!n.endDate&&i.isBefore(n.startDate,"day")&&l.className.push("is-disabled"),n.selectBackward&&!n.singleDate&&n.startDate&&!n.endDate&&i.isAfter(n.startDate,"day")&&l.className.push("is-disabled"),!n.disableWeekends||6!=i.isoWeekday()&&7!=i.isoWeekday()||l.className.push("is-disabled"),l.className=l.className.filter((function(e,t,n){return n.indexOf(e)===t})),l.className.indexOf("is-disabled")>=0&&l.className.indexOf("is-available")>=0&&l.className.splice(l.className.indexOf("is-available"),1);var p=t.createElement("div");return p.className=l.className.join(" "),p.innerHTML=i.get("date"),p.setAttribute("data-time",l.time),p.outerHTML},s=function(n,i){var r=e(n);if(i.dropdowns&&i.dropdowns.months){a=t.createElement("select");for(var o=0;o<12;o++){r.set("month",o);var s=t.createElement("option");s.value=r.toDate().getMonth(),s.text=r.toDate().toLocaleString(i.lang,{month:"long"}),o===n.toDate().getMonth()&&s.setAttribute("selected","selected"),a.appendChild(s)}a.dir="rtl"}else{var a;(a=t.createElement("span")).innerHTML=r.toDate().toLocaleString(i.lang,{month:"long"})}return a.className="lightpick__select lightpick__select-months",a.outerHTML},a=function(n,i){var r=e(n),o=t.createElement("select"),s=i.dropdowns&&i.dropdowns.years?i.dropdowns.years:null,a=s&&s.min?s.min:1900,l=s&&s.max?s.max:Number.parseInt(e().format("YYYY"));Number.parseInt(n.format("YYYY"))l&&(l=Number.parseInt(n.format("YYYY")));for(var c=a;c<=l;c++){r.set("year",c);var u=t.createElement("option");u.value=r.toDate().getFullYear(),u.text=r.toDate().getFullYear(),c===n.toDate().getFullYear()&&u.setAttribute("selected","selected"),o.appendChild(u)}return o.className="lightpick__select lightpick__select-years",i.dropdowns&&i.dropdowns.years||(o.disabled=!0),o.outerHTML},l=function(t,n){for(var l="",c=e(n.calendar[0]),u=0;u',l+='
    ',l+='
    '+s(d,n)+a(d,n)+"
    ",1===n.numberOfMonths&&(l+=i(n)),l+="
    ",l+='
    ';for(var h=n.firstDay+4;h<7+n.firstDay+4;++h)l+='
    '+r(n,h,!0)+"
    ";if(l+="
    ",l+='
    ',d.isoWeekday()!==n.firstDay)for(var p=d.isoWeekday()-n.firstDay>0?d.isoWeekday()-n.firstDay:d.isoWeekday(),f=e(d).subtract(p,"day"),m=f.daysInMonth(),g=f.get("date");g<=m;g++)l+=o(n,f,u>0,"is-previous-month"),f.add(1,"day");for(m=d.daysInMonth(),new Date,g=0;g",l+="",c.add(1,"month")}n.calendar[1]=e(c),t.querySelector(".lightpick__months").innerHTML=l},c=function(e,t){var n=e.querySelectorAll(".lightpick__day");[].forEach.call(n,(function(e){e.outerHTML=o(t,parseInt(e.getAttribute("data-time")),!1,e.className.split(" "))})),u(e,t)},u=function(t,n){if(!n.disabledDatesInRange&&n.startDate&&!n.endDate&&n.disableDates){var i=t.querySelectorAll(".lightpick__day"),r=n.disableDates.map((function(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)?e[0]:e})),o=e(r.filter((function(t){return e(t).isBefore(n.startDate)})).sort((function(t,n){return e(n).isAfter(e(t))}))[0]),s=e(r.filter((function(t){return e(t).isAfter(n.startDate)})).sort((function(t,n){return e(t).isAfter(e(n))}))[0]);[].forEach.call(i,(function(t){var i=e(parseInt(t.getAttribute("data-time")));(o&&i.isBefore(o)&&n.startDate.isAfter(o)||s&&i.isAfter(s)&&s.isAfter(n.startDate))&&(t.classList.remove("is-available"),t.classList.add("is-disabled"))}))}},d=function(n){var r=this,o=r.config(n);r.el=t.createElement("section"),r.el.className="lightpick lightpick--"+o.numberOfColumns+"-columns is-hidden",o.inline&&(r.el.className+=" lightpick--inlined");var s='
    '+(o.numberOfMonths>1?i(o):"")+'
    ';o.footer&&(s+='"),r.el.innerHTML=s+="
    ",o.parentEl instanceof Node?o.parentEl.appendChild(r.el):"body"===o.parentEl&&o.inline?o.field.parentNode.appendChild(r.el):t.querySelector(o.parentEl).appendChild(r.el),r._onMouseDown=function(t){if(r.isShowing){var n=(t=t||window.event).target||t.srcElement;if(n){t.stopPropagation(),n.classList.contains("lightpick__select")||t.preventDefault();var i=r._opts;if(n.classList.contains("lightpick__day")&&n.classList.contains("is-available")){var o=e(parseInt(n.getAttribute("data-time")));if(!i.disabledDatesInRange&&i.disableDates&&i.startDate){var s=o.isAfter(i.startDate)?e(i.startDate):e(o),a=o.isAfter(i.startDate)?e(o):e(i.startDate);if(i.disableDates.filter((function(t){if(t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)){var n=e(t[0]),i=e(t[1]);return n.isValid()&&i.isValid()&&(n.isBetween(s,a,"day","[]")||i.isBetween(s,a,"day","[]"))}return e(t).isBetween(s,a,"day","[]")})).length)return r.setStartDate(null),r.setEndDate(null),n.dispatchEvent(new Event("mousedown")),r.el.querySelector(".lightpick__tooltip").style.visibility="hidden",void c(r.el,i)}if(i.singleDate||!i.startDate&&!i.endDate||i.startDate&&i.endDate?i.repick&&i.startDate&&i.endDate?(i.repickTrigger===i.field?(r.setStartDate(o),n.classList.add("is-start-date")):(r.setEndDate(o),n.classList.add("is-end-date")),i.startDate.isAfter(i.endDate)&&r.swapDate(),i.autoclose&&setTimeout((function(){r.hide()}),100)):(r.setStartDate(o),r.setEndDate(null),n.classList.add("is-start-date"),i.singleDate&&i.autoclose?setTimeout((function(){r.hide()}),100):i.singleDate&&!i.inline||c(r.el,i)):i.startDate&&!i.endDate&&(r.setEndDate(o),i.startDate.isAfter(i.endDate)&&r.swapDate(),n.classList.add("is-end-date"),i.autoclose?setTimeout((function(){r.hide()}),100):c(r.el,i)),!i.disabledDatesInRange&&0===r.el.querySelectorAll(".lightpick__day.is-available").length&&(r.setStartDate(null),c(r.el,i),i.footer))if("function"==typeof r._opts.onError)r._opts.onError.call(r,"Invalid range");else{var l=r.el.querySelector(".lightpick__footer-message");l&&(l.innerHTML=i.locale.not_allowed_range,setTimeout((function(){l.innerHTML=""}),3e3))}}else n.classList.contains("lightpick__previous-action")?r.prevMonth():n.classList.contains("lightpick__next-action")?r.nextMonth():n.classList.contains("lightpick__close-action")||n.classList.contains("lightpick__apply-action")?r.hide():n.classList.contains("lightpick__reset-action")&&r.reset()}}},r._onMouseEnter=function(t){if(r.isShowing){var n=(t=t||window.event).target||t.srcElement;if(n){var i=r._opts;if(n.classList.contains("lightpick__day")&&n.classList.contains("disabled-tooltip")&&i.locale.tooltipOnDisabled)r.showTooltip(n,i.locale.tooltipOnDisabled);else if(r.hideTooltip(),!i.singleDate&&(i.startDate||i.endDate)&&(n.classList.contains("lightpick__day")||n.classList.contains("is-available"))&&(i.startDate&&!i.endDate||i.repick)){var o=e(parseInt(n.getAttribute("data-time")));if(!o.isValid())return;var s=i.startDate&&!i.endDate||i.repick&&i.repickTrigger===i.secondField?i.startDate:i.endDate,a=r.el.querySelectorAll(".lightpick__day");if([].forEach.call(a,(function(t){var n=e(parseInt(t.getAttribute("data-time")));t.classList.remove("is-flipped"),n.isValid()&&n.isSameOrAfter(s,"day")&&n.isSameOrBefore(o,"day")?(t.classList.add("is-in-range"),i.repickTrigger===i.field&&n.isSameOrAfter(i.endDate)&&t.classList.add("is-flipped")):n.isValid()&&n.isSameOrAfter(o,"day")&&n.isSameOrBefore(s,"day")?(t.classList.add("is-in-range"),(i.startDate&&!i.endDate||i.repickTrigger===i.secondField)&&n.isSameOrBefore(i.startDate)&&t.classList.add("is-flipped")):t.classList.remove("is-in-range"),t.classList.remove(i.startDate&&i.endDate&&i.repick&&i.repickTrigger===i.field?"is-start-date":"is-end-date")})),i.hoveringTooltip)if(a=Math.abs(o.isAfter(s)?o.diff(s,"day"):s.diff(o,"day")),i.tooltipNights||(a+=1),r.el.querySelector(".lightpick__tooltip"),a>0&&!n.classList.contains("is-disabled")){var l="";"function"==typeof i.locale.pluralize&&(l=i.locale.pluralize.call(r,a,i.locale.tooltip)),r.showTooltip(n,a+" "+l)}else r.hideTooltip();n.classList.add(i.startDate&&i.endDate&&i.repick&&i.repickTrigger===i.field?"is-start-date":"is-end-date")}}}},r._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(t.classList.contains("lightpick__select-months")?r.gotoMonth(t.value):t.classList.contains("lightpick__select-years")&&r.gotoYear(t.value))},r._onInputChange=function(e){r._opts.singleDate&&(r._opts.autoclose||r.gotoDate(o.field.value)),r.syncFields(),r.isShowing||r.show()},r._onInputFocus=function(e){r.show(e.target||e.srcElement)},r._onInputClick=function(e){r.show(e.target||e.srcElement)},r._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,n=t;if(t){do{if(n.classList&&n.classList.contains("lightpick")||n===o.field||o.secondField&&n===o.secondField)return}while(n=n.parentNode);r.isShowing&&o.hideOnBodyClick&&t!==o.field&&n!==o.field&&r.hide()}},r.showTooltip=function(e,t){var n=r.el.querySelector(".lightpick__tooltip"),i=r.el.classList.contains("lightpick--inlined"),o=e.getBoundingClientRect(),s=i?r.el.parentNode.getBoundingClientRect():r.el.getBoundingClientRect(),a=o.left-s.left+o.width/2,l=o.top-s.top;n.style.visibility="visible",n.textContent=t;var c=n.getBoundingClientRect();l-=c.height,a-=c.width/2,setTimeout((function(){n.style.top=l+"px",n.style.left=a+"px"}),10)},r.hideTooltip=function(){r.el.querySelector(".lightpick__tooltip").style.visibility="hidden"},r.el.addEventListener("mousedown",r._onMouseDown,!0),r.el.addEventListener("mouseenter",r._onMouseEnter,!0),r.el.addEventListener("touchend",r._onMouseDown,!0),r.el.addEventListener("change",r._onChange,!0),o.inline?r.show():r.hide(),o.field.addEventListener("change",r._onInputChange),o.field.addEventListener("click",r._onInputClick),o.field.addEventListener("focus",r._onInputFocus),o.secondField&&(o.secondField.addEventListener("change",r._onInputChange),o.secondField.addEventListener("click",r._onInputClick),o.secondField.addEventListener("focus",r._onInputFocus))};return d.prototype={config:function(t){var i=Object.assign({},n,t);if(i.field=i.field&&i.field.nodeName?i.field:null,i.calendar=[e().set("date",1)],1===i.numberOfMonths&&i.numberOfColumns>1&&(i.numberOfColumns=1),i.minDate=i.minDate&&e(i.minDate).isValid()?e(i.minDate):null,i.maxDate=i.maxDate&&e(i.maxDate).isValid()?e(i.maxDate):null,"auto"===i.lang){var r=navigator.language||navigator.userLanguage;i.lang=r||"en-US"}return i.secondField&&i.singleDate&&(i.singleDate=!1),i.hoveringTooltip&&i.singleDate&&(i.hoveringTooltip=!1),"[object Object]"===Object.prototype.toString.call(t.locale)&&(i.locale=Object.assign({},n.locale,t.locale)),window,i.repick&&!i.secondField&&(i.repick=!1),i.inline&&(i.autoclose=!1,i.hideOnBodyClick=!1),this._opts=Object.assign({},i),this.syncFields(),this.setStartDate(this._opts.startDate,!0),this.setEndDate(this._opts.endDate,!0),this._opts},syncFields:function(){if(this._opts.singleDate||this._opts.secondField)e(this._opts.field.value,this._opts.format).isValid()&&(this._opts.startDate=e(this._opts.field.value,this._opts.format)),this._opts.secondField&&e(this._opts.secondField.value,this._opts.format).isValid()&&(this._opts.endDate=e(this._opts.secondField.value,this._opts.format));else{var t=this._opts.field.value.split(this._opts.separator);2===t.length&&(e(t[0],this._opts.format).isValid()&&(this._opts.startDate=e(t[0],this._opts.format)),e(t[1],this._opts.format).isValid()&&(this._opts.endDate=e(t[1],this._opts.format)))}},swapDate:function(){var t=e(this._opts.startDate);this.setDateRange(this._opts.endDate,t)},gotoToday:function(){this.gotoDate(new Date)},gotoDate:function(t){(t=e(t)).isValid()||(t=e()),t.set("date",1),this._opts.calendar=[e(t)],l(this.el,this._opts)},gotoMonth:function(e){isNaN(e)||(this._opts.calendar[0].set("month",e),l(this.el,this._opts))},gotoYear:function(e){isNaN(e)||(this._opts.calendar[0].set("year",e),l(this.el,this._opts))},prevMonth:function(){this._opts.calendar[0]=e(this._opts.calendar[0]).subtract(this._opts.numberOfMonths,"month"),l(this.el,this._opts),u(this.el,this._opts)},nextMonth:function(){this._opts.calendar[0]=e(this._opts.calendar[1]),l(this.el,this._opts),u(this.el,this._opts)},updatePosition:function(){if(!this.el.classList.contains("lightpick--inlined")){this.el.classList.remove("is-hidden");var e=this._opts.field.getBoundingClientRect(),n=this.el.getBoundingClientRect(),i=this._opts.orientation.split(" "),r=0,o=0;"auto"!=i[0]&&/top|bottom/.test(i[0])?(r=e[i[0]]+window.pageYOffset,"top"==i[0]&&(r-=n.height)):r=e.bottom+n.height>window.innerHeight&&window.pageYOffset>n.height||e.bottom+n.height>t.body.offsetHeight?e.top+window.pageYOffset-n.height:e.bottom+window.pageYOffset,/left|right/.test(i[0])||i[1]&&"auto"!=i[1]&&/left|right/.test(i[1])?(o=/left|right/.test(i[0])?e[i[0]]+window.pageXOffset:e[i[1]]+window.pageXOffset,"right"!=i[0]&&"right"!=i[1]||(o-=n.width)):o=e.left+n.width>window.innerWidth?e.right+window.pageXOffset-n.width:e.left+window.pageXOffset,this.el.classList.add("is-hidden"),this.el.style.top=r+"px",this.el.style.left=o+"px"}},setStartDate:function(t,n){var i=e(t,e.ISO_8601),r=e(t,this._opts.format);if(!i.isValid()&&!r.isValid())return this._opts.startDate=null,void(this._opts.field.value="");this._opts.startDate=e(i.isValid()?i:r),this._opts.field.value=this._opts.singleDate||this._opts.secondField?this._opts.startDate.format(this._opts.format):this._opts.startDate.format(this._opts.format)+this._opts.separator+"...",n||"function"!=typeof this._opts.onSelect||this._opts.onSelect.call(this,this.getStartDate(),this.getEndDate())},setEndDate:function(t,n){var i=e(t,e.ISO_8601),r=e(t,this._opts.format);if(!i.isValid()&&!r.isValid())return this._opts.endDate=null,void(this._opts.secondField?this._opts.secondField.value="":!this._opts.singleDate&&this._opts.startDate&&(this._opts.field.value=this._opts.startDate.format(this._opts.format)+this._opts.separator+"..."));this._opts.endDate=e(i.isValid()?i:r),this._opts.secondField?(this._opts.field.value=this._opts.startDate.format(this._opts.format),this._opts.secondField.value=this._opts.endDate.format(this._opts.format)):this._opts.field.value=this._opts.startDate.format(this._opts.format)+this._opts.separator+this._opts.endDate.format(this._opts.format),n||"function"!=typeof this._opts.onSelect||this._opts.onSelect.call(this,this.getStartDate(),this.getEndDate())},setDate:function(e){this._opts.singleDate&&this.setStartDate(e,!0)},setDateRange:function(e,t,n){this._opts.singleDate||(this.setStartDate(e,!0),this.setEndDate(t,!0),this.isShowing&&c(this.el,this._opts),n||"function"!=typeof this._opts.onSelect||this._opts.onSelect.call(this,this.getStartDate(),this.getEndDate()))},setDisableDates:function(e){this._opts.disableDates=e,this.isShowing&&c(this.el,this._opts)},getStartDate:function(){return e(this._opts.startDate).isValid()?this._opts.startDate:null},getEndDate:function(){return e(this._opts.endDate).isValid()?this._opts.endDate:null},getDate:function(){return e(this._opts.startDate).isValid()?this._opts.startDate:null},toString:function(t){return this._opts.singleDate?e(this._opts.startDate).isValid()?this._opts.startDate.format(t):"":e(this._opts.startDate).isValid()&&e(this._opts.endDate).isValid()?this._opts.startDate.format(t)+this._opts.separator+this._opts.endDate.format(t):e(this._opts.startDate).isValid()&&!e(this._opts.endDate).isValid()?this._opts.startDate.format(t)+this._opts.separator+"...":!e(this._opts.startDate).isValid()&&e(this._opts.endDate).isValid()?"..."+this._opts.separator+this._opts.endDate.format(t):""},show:function(e){this.isShowing||(this.isShowing=!0,this._opts.repick&&(this._opts.repickTrigger=e),this.syncFields(),this.gotoDate(this._opts.secondField&&this._opts.secondField===e&&this._opts.endDate?this._opts.endDate:this._opts.startDate),t.addEventListener("click",this._onClick),this.updatePosition(),this.el.classList.remove("is-hidden"),"function"==typeof this._opts.onOpen&&this._opts.onOpen.call(this),t.activeElement&&t.activeElement!=t.body&&t.activeElement.blur())},hide:function(){this.isShowing&&(this.isShowing=!1,t.removeEventListener("click",this._onClick),this.el.classList.add("is-hidden"),this.el.querySelector(".lightpick__tooltip").style.visibility="hidden","function"==typeof this._opts.onClose&&this._opts.onClose.call(this))},destroy:function(){var e=this._opts;this.hide(),this.el.removeEventListener("mousedown",self._onMouseDown,!0),this.el.removeEventListener("mouseenter",self._onMouseEnter,!0),this.el.removeEventListener("change",self._onChange,!0),e.field.removeEventListener("change",this._onInputChange),e.field.removeEventListener("click",this._onInputClick),e.field.removeEventListener("focus",this._onInputFocus),e.secondField&&(e.secondField.removeEventListener("change",this._onInputChange),e.secondField.removeEventListener("click",this._onInputClick),e.secondField.removeEventListener("focus",this._onInputFocus)),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},reset:function(){this.setStartDate(null,!0),this.setEndDate(null,!0),c(this.el,this._opts),"function"==typeof this._opts.onSelect&&this._opts.onSelect.call(this,this.getStartDate(),this.getEndDate()),this.el.querySelector(".lightpick__tooltip").style.visibility="hidden"},reloadOptions:function(e){this._opts=Object.assign({},this._opts,e)}},d})),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}((function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n;return function(){var e,n,i;t&&t.requirejs||(t?n=t:t={},function(t){function r(e,t){return b.call(e,t)}function o(e,t){var n,i,r,o,s,a,l,c,u,d,h,p=t&&t.split("/"),f=y.map,m=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&E.test(e[s])&&(e[s]=e[s].replace(E,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),u=0;u0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((p||m)&&f){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if((r=f[p.slice(0,d).join("/")])&&(r=r[i])){o=r,a=u;break}if(o)break;!l&&m&&m[i]&&(l=m[i],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function s(e,n){return function(){var i=_.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),p.apply(t,i.concat([e,n]))}}function a(e){return function(t){g[e]=t}}function l(e){if(r(v,e)){var n=v[e];delete v[e],w[e]=!0,h.apply(t,n)}if(!r(g,e)&&!r(w,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function u(e){return e?c(e):[]}function d(e){return function(){return y&&y.config&&y.config[e]||{}}}var h,p,f,m,g={},v={},y={},w={},b=Object.prototype.hasOwnProperty,_=[].slice,E=/\.js$/;f=function(e,t){var n,i=c(e),r=i[0],s=t[1];return e=i[1],r&&(n=l(r=o(r,s))),r?e=n&&n.normalize?n.normalize(e,function(e){return function(t){return o(t,e)}}(s)):o(e,s):(r=(i=c(e=o(e,s)))[0],e=i[1],r&&(n=l(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},m={require:function(e){return s(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:d(e)}}},h=function(e,n,i,o){var c,d,h,p,y,b,_,E=[],x=_typeof(i);if(b=u(o=o||e),"undefined"===x||"function"===x){for(n=!n.length&&i.length?["require","exports","module"]:n,y=0;y0&&(t.call(arguments,e.prototype.constructor),r=n.prototype.constructor),r.apply(this,arguments)}var r=t(n),o=t(e);n.displayName=e.displayName,i.prototype=new function(){this.constructor=i};for(var s=0;s":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,(function(e){i=i.add(e)})),n=i}t.append(n)},n})),t.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('
      ');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('
    • '),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")}))}))},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var r in t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]),i)n.setAttribute(r,i[r]);if(t.children){var o=e(n),s=document.createElement("strong");s.className="select2-results__group",e(s),this.template(t,s);for(var a=[],l=0;l",{class:"select2-results__options select2-results__options--nested"});u.append(a),o.append(s),o.append(u)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this;this.$results.attr("id",t.id+"-results"),t.on("results:all",(function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),t.on("results:append",(function(e){i.append(e.data),t.isOpen()&&i.setClasses()})),t.on("query",(function(e){i.hideMessages(),i.showLoading(e)})),t.on("select",(function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),t.on("unselect",(function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),t.on("open",(function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()})),t.on("close",(function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")})),t.on("results:toggle",(function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),t.on("results:select",(function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}})),t.on("results:previous",(function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var r=n-1;0===e.length&&(r=0);var o=t.eq(r);o.trigger("mouseenter");var s=i.$results.offset().top,a=o.offset().top,l=i.$results.scrollTop()+(a-s);0===r?i.$results.scrollTop(0):a-s<0&&i.$results.scrollTop(l)}})),t.on("results:next",(function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var o=i.$results.offset().top+i.$results.outerHeight(!1),s=r.offset().top+r.outerHeight(!1),a=i.$results.scrollTop()+s-o;0===n?i.$results.scrollTop(0):s>o&&i.$results.scrollTop(a)}})),t.on("results:focus",(function(e){e.element.addClass("select2-results__option--highlighted")})),t.on("results:message",(function(e){i.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,r=e.deltaY>0&&t-e.deltaY<=0,o=e.deltaY<0&&n<=i.$results.height();r?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):o&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(t){var n=e(this),r=n.data("data");"true"!==n.attr("aria-selected")?i.trigger("select",{originalEvent:t,data:r}):i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:r}):i.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(t,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=r(o):e(n).append(o)},n})),t.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),t.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex)})),e.on("disable",(function(){i.$selection.attr("tabindex","-1")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,(function(t){var n=e(t.target).closest(".select2");e(".select2.select2-container--open").each((function(){var t=e(this);this!=n[0]&&t.data("element").select2("close")}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i})),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.focus()})),e.on("selection:update",(function(e){n.update(e.data)}))},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r})),t.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
        '),e},i.prototype.bind=function(t,n){var r=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(e){r.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!r.options.get("disabled")){var n=e(this).parent().data("data");r.trigger("unselect",{originalEvent:t,data:n})}}))},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('
      • ×
      • ')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i1||1==t.length&&t[0].id!=this.placeholder.id)return e.call(this,t);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},t})),t.define("select2/selection/allowClear",["jquery","../keys"],(function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(e){i._handleClear(e)})),t.on("keypress",(function(e){i._handleKeyboardClear(e,t)}))},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r0||0===n.length)){var i=e('×');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n})),t.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var r=this;e.call(this,t,i),t.on("open",(function(){r.$search.trigger("focus")})),t.on("close",(function(){r.$search.val(""),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")})),t.on("enable",(function(){r.$search.prop("disabled",!1),r._transferTabIndex()})),t.on("disable",(function(){r.$search.prop("disabled",!0)})),t.on("focus",(function(e){r.$search.trigger("focus")})),t.on("results:focus",(function(e){r.$search.attr("aria-activedescendant",e.id)})),this.$selection.on("focusin",".select2-search--inline",(function(e){r.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){r._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");r.searchRemoveChoice(i),e.preventDefault()}}}));var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){r.$selection.off(s?"input.search input.searchcheck":"keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&r.handleSearch(e)}}))},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){var e;this.$search.css("width","25px"),e=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},i})),t.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",(function(t,n){if(-1!==e.inArray(t,o)){var i=e.Event("select2:"+t,{params:n=n||{}});r.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}}))},t})),t.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n})),t.define("select2/diacritics",[],(function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}})),t.define("select2/data/base",["../utils"],(function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return(i+=e.generateChars(4))+(null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4))},t})),t.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each((function(){var e=n(this),r=i.item(e);t.push(r)})),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");this.$element.prop("multiple")?this.current((function(i){var r=[];(e=[e]).push.apply(e,i);for(var o=0;o=0){var u=o.filter(i(c)),d=this.item(u),h=n.extend(!0,{},c,d),p=this.option(h);u.replaceWith(p)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}a.push(f)}}return a},i})),t.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=o.transport(o,(function(i){var o=r.processResults(i,e);r.options.get("debug")&&window.console&&console.error&&(o&&o.results&&n.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(o)}),(function(){i.status&&"0"===i.status||r.trigger("results:message",{message:"errorLoading"})}));r._request=i}var r=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof o.url&&(o.url=o.url.call(this.$element,e)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i})),t.define("select2/data/tags",["jquery"],(function(e){function t(t,n,i){var r=i.get("tags"),o=i.get("createTag");void 0!==o&&(this.createTag=o);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,i),e.isArray(r))for(var a=0;a0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current((function(r){i.maximumSelectionLength>0&&(null!=r?r.length:0)>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery","../utils"],(function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout((function(){r.$search.focus()}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.val("")})),n.on("focus",(function(){n.isOpen()||r.$search.focus()})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}))},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--)this.placeholder.id===t[i].id&&n.splice(i,1);return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),n.on("query",(function(e){r.lastParams=e,r.loading=!0})),n.on("query:append",(function(e){r.lastParams=e,r.loading=!0})),this.$results.on("scroll",(function(){var t=e.contains(document.documentElement,r.$loadingMore[0]);!r.loading&&t&&r.$results.offset().top+r.$results.outerHeight(!1)+50>=r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)&&r.loadMore()}))},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('
      • '),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",(function(){i._positionDropdown(),i._resizeDropdown()})),t.on("results:append",(function(){i._positionDropdown(),i._resizeDropdown()})))})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e(""),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)})),e(window).on(o+" "+s+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=lo.bottom+a,h={left:o.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();h.top-=f.top,h.left-=f.left,n||i||(r="below"),d||!u||n?!u&&d&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(h.top=s.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(h)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i0&&(a.dataAdapter=c.Decorate(a.dataAdapter,v)),a.maximumInputLength>0&&(a.dataAdapter=c.Decorate(a.dataAdapter,y)),a.maximumSelectionLength>0&&(a.dataAdapter=c.Decorate(a.dataAdapter,w)),a.tags&&(a.dataAdapter=c.Decorate(a.dataAdapter,m)),null==a.tokenSeparators&&null==a.tokenizer||(a.dataAdapter=c.Decorate(a.dataAdapter,g)),null!=a.query){var d=t(a.amdBase+"compat/query");a.dataAdapter=c.Decorate(a.dataAdapter,d)}if(null!=a.initSelection){var k=t(a.amdBase+"compat/initSelection");a.dataAdapter=c.Decorate(a.dataAdapter,k)}}if(null==a.resultsAdapter&&(a.resultsAdapter=n,null!=a.ajax&&(a.resultsAdapter=c.Decorate(a.resultsAdapter,x)),null!=a.placeholder&&(a.resultsAdapter=c.Decorate(a.resultsAdapter,E)),a.selectOnClose&&(a.resultsAdapter=c.Decorate(a.resultsAdapter,T))),null==a.dropdownAdapter){var A=c.Decorate(b,_);if(a.dropdownAdapter=A,0!==a.minimumResultsForSearch&&(a.dropdownAdapter=c.Decorate(a.dropdownAdapter,S)),a.closeOnSelect&&(a.dropdownAdapter=c.Decorate(a.dropdownAdapter,D)),null!=a.dropdownCssClass||null!=a.dropdownCss||null!=a.adaptDropdownCssClass){var O=t(a.amdBase+"compat/dropdownCss");a.dropdownAdapter=c.Decorate(a.dropdownAdapter,O)}a.dropdownAdapter=c.Decorate(a.dropdownAdapter,C)}if(null==a.selectionAdapter){if(a.selectionAdapter=a.multiple?r:i,null!=a.placeholder&&(a.selectionAdapter=c.Decorate(a.selectionAdapter,o)),a.allowClear&&(a.selectionAdapter=c.Decorate(a.selectionAdapter,s)),null!=a.containerCssClass||null!=a.containerCss||null!=a.adaptContainerCssClass){var M=t(a.amdBase+"compat/containerCss");a.selectionAdapter=c.Decorate(a.selectionAdapter,M)}a.selectionAdapter=c.Decorate(a.selectionAdapter,l)}if("string"==typeof a.language)if(a.language.indexOf("-")>0){var $=a.language.split("-")[0];a.language=[a.language,$]}else a.language=[a.language];if(e.isArray(a.language)){var N=new u;a.language.push("en");for(var I=a.language,P=0;P0){for(var o=e.extend(!0,{},r),s=r.children.length-1;s>=0;s--)null==n(i,r.children[s])&&o.children.splice(s,1);return o.children.length>0?o:n(i,o)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},A.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var r=c._convertData(i);e.extend(this.defaults,r)},new A})),t.define("select2/options",["require","jquery","./defaults","./utils"],(function(e,t,n,i){function r(t,r){if(this.options=t,null!=r&&this.fromElement(r),this.options=n.apply(this.options),r&&r.is("input")){var o=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,o)}}return r.prototype.fromElement=function(e){var n,r=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(this.options.dir=e.prop("dir")?e.prop("dir"):e.closest("[dir]").prop("dir")?e.closest("[dir]").prop("dir"):"ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl"))),n=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var o=t.extend(!0,{},n);for(var s in o=i._convertData(o))t.inArray(s,r)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],o[s]):this.options[s]=o[s]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r})),t.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,i){var r=function e(n,i){null!=n.data("select2")&&n.data("select2").destroy(),this.$element=n,this.id=this._generateId(n),this.options=new t(i=i||{},n),e.__super__.constructor.call(this);var r=n.attr("tabindex")||0;n.data("old-tabindex",r),n.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(n,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(n,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(n,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(n,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){u.trigger("selection:update",{data:e})})),n.addClass("select2-hidden-accessible"),n.attr("aria-hidden","true"),this._syncAttributes(),n.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a=1)return c[1]}return null}return t},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",(function(){t.dataAdapter.current((function(e){t.trigger("selection:update",{data:e})}))})),this.$element.on("focus.select2",(function(e){t.trigger("focus",e)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i((function(n){e.each(n,t._syncA),e.each(n,t._syncS)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",(function(){t.toggleDropdown()})),this.selection.on("focus",(function(e){t.focus(e)})),this.selection.on("*",(function(i,r){-1===e.inArray(i,n)&&t.trigger(i,r)}))},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},r.prototype._registerEvents=function(){var e=this;this.on("open",(function(){e.$container.addClass("select2-container--open")})),this.on("close",(function(){e.$container.removeClass("select2-container--open")})),this.on("enable",(function(){e.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){e.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){e.$container.removeClass("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,(function(n){e.trigger("results:all",{data:n,query:t})}))})),this.on("query:append",(function(t){this.dataAdapter.query(t,(function(n){e.trigger("results:append",{data:n,query:t})}))})),this.on("keypress",(function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var r=0;r0&&(n=!0);else n=!0;n&&this.dataAdapter.current((function(e){i.trigger("selection:update",{data:e})}))}},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var o={prevented:!1,name:e,args:t};if(n.call(this,i[e],o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.trigger("query",{})},r.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]),this.$element.prop("disabled",!e[0])},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current((function(t){e=t})),e},r.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,(function(e){return e.toString()}))),this.$element.val(n).trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},r})),t.define("select2/compat/utils",["jquery"],(function(e){return{syncCssClasses:function(t,n,i){var r,o,s=[];(r=e.trim(t.attr("class")))&&e((r=""+r).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&s.push(this)})),(r=e.trim(n.attr("class")))&&e((r=""+r).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(o=i(this))&&s.push(o)})),t.attr("class",s.join(" "))}}})),t.define("select2/compat/containerCss",["jquery","./utils"],(function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("containerCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i})),t.define("select2/compat/dropdownCss",["jquery","./utils"],(function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("dropdownCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i})),t.define("select2/compat/initSelection",["jquery"],(function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;this._isInitialized?t.call(this,n):this.initSelection.call(null,this.$element,(function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)}))},t})),t.define("select2/compat/inputData",["jquery"],(function(e){function t(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,i,r){var o=this,s=i.id+"-results";e.call(this,i,r),i.on("open",(function(){o.$search.attr("aria-controls",s),o.$search.trigger("focus")})),i.on("close",(function(){o.$search.val(""),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),i.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),i.on("disable",(function(){o.$search.prop("disabled",!0)})),i.on("focus",(function(e){o.$search.trigger("focus")})),i.on("results:focus",(function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(){i._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected((function(){e.call(i,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){0=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery","../utils"],(function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this,o=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout((function(){r.$search.trigger("focus")}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||r.$search.trigger("focus")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})),n.on("results:focus",(function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}))},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--)this.placeholder.id===t[i].id&&n.splice(i,1);return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",(function(e){i.lastParams=e,i.loading=!0})),t.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&t){var n=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=n+50&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('
      • '),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e(""),i=t.call(this);return n.append(i),this.$dropdownContainer=n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)})),e(window).on(o+" "+s+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=lo.bottom+a,h={left:o.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f={top:0,left:0};(e.contains(document.body,p[0])||p[0].isConnected)&&(f=p.offset()),h.top-=f.top,h.left-=f.left,n||i||(r="below"),d||!u||n?!u&&d&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(h.top=s.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(h)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r})),t.define("jquery-mousewheel",["jquery"],(function(e){return e})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(e,t,n,i,r){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var i=e.extend(!0,{},t);new n(e(this),i)})),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var i,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var e=r.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,s)})),-13)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}();var getScrollbarWidth=function(){var e,t=getScrollbarWidth.width;return void 0===t&&((e=document.createElement("div")).innerHTML='
        ',e=e.firstChild,document.body.appendChild(e),t=getScrollbarWidth.width=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},bannerSettings={getPositionChangeOpacityPara:2,menuHeight:56,opacitySpeed:100},menuSettings={breakpoint:1200,iscrollMenuEnable:!1,itemsAnimationDelay:50,menuChange:!0};function closeProgress(){$(".progress-backdrop").addClass("out"),$(".progress-wrap").addClass("out"),setTimeout((function(){$(".progress-backdrop").remove(),$(".progress-wrap").remove()}),500)}function progressMove(){var e=$(".progress-bar"),t=0,n=setInterval((function(){t>=100?(closeProgress(),clearInterval(n)):(t++,e.css("width",t+"%"))}),5)}function progressMoveError(){var e=$(".progress-bar"),t=0,n=setInterval((function(){t>=70?(clearInterval(n),$(".progress-wrap").addClass("error"),$("#modal-alert").modal("show")):(t++,e.css("width",t+"%"))}),5)}$.fn.isolatedScroll=function(){return this.bind("mousewheel DOMMouseScroll",(function(e){var t=e.wheelDelta||e.originalEvent&&e.originalEvent.wheelDelta||-e.detail,n=this.scrollTop+$(this).outerHeight()-this.scrollHeight>=0;(t<0&&n||t>0&&this.scrollTop<=0)&&e.preventDefault()})),this};var progressRunHtml='
        ';function radioShow(){$(".radio-control > input[type=radio],.radio-control > input[type=checkbox]").each((function(){$(this).is(":checked")?$(this).closest(".radio-show").addClass("show"):$(this).closest(".radio-show").removeClass("show")}))}function menuBannerScroll(){var e=$(".banner__overlay"),t=0*$(".menu").height(),n=$(window).scrollTop();screen,$(".menu").height(),e.css("opacity",$(window).scrollTop()/(e.height()-t)),1==menuSettings&&($(window).height()menuSettings.breakpoint&&($("#menu-trigger").prop("checked",!1),BNS.off())}!function(e){e.fn.isActive=function(){return e(this.get(0)).hasClass("open")}}(jQuery),$(document).ready((function(){$(".sidebar-overlay").on("touchstart",(function(e){$("#sidebar-trigger").prop("checked",!1).trigger("change"),e.preventDefault()})),$(".sidebar-overlay").on("touchstart",(function(e){$("#sidebar-right-trigger").prop("checked",!1).trigger("change"),e.preventDefault()})),$(".progress-run").on("click",(function(){$("body").append(progressRunHtml),progressMove()})),$(".progress-run-error").on("click",(function(){$("body").append(progressRunHtml),progressMoveError()})),$(".close-progress").on("click",(function(){closeProgress()})),$(window).width()<=menuSettings.breakpoint&&($("[mega-menu-control]").each((function(){$(this).on("click",(function(){$(this).closest("[mega-menu-wrap]").addClass("menu__mega--active")}))})),$("[mega-menu-back]").each((function(){$(this).on("click",(function(){$(this).closest("[mega-menu-wrap]").removeClass("menu__mega--active")}))})),$("#menu-trigger").on("change",(function(){$("[mega-menu-wrap]").removeClass("menu__mega--active")}))),$(".input-upload-input").on("change",(function(){var e=$(this).val().replace(/^.*[\\\/]/,"");$(this).siblings(".input-upload").find(".ellipsis").html(e).addClass("color-black").removeClass("color-grey")})),$(".select-2").each((function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval")})),$(".select-2").change((function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval")})),$(".input-material:not(.static)").each((function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval"),$(this).on("blur change",(function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval")}))})),$(".input-material-2:not(.static)").each((function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval"),$(this).on("blur change",(function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval")}))})),$(".input-material-3:not(.static)").each((function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval"),$(this).on("blur change",(function(){0==$(this).val().length?$(this).removeClass("input-hadval"):$(this).addClass("input-hadval")}))})),$(".input-clear").on("click",(function(){var e=$(this).siblings().closest("input");e.val(""),e.trigger("change"),e.keyup(),e.focus()})),$(".input-has-clear").on("paste keyup change",(function(){var e=$(this).siblings().closest(".input-clear");$(this).val()?e.addClass("show"):e.removeClass("show")})),$(".hide-password").each((function(){$(this).on("change",(function(){$(this).is(":checked")?($(this).closest(".input-group").find("input[type=password]").prop("type","text"),$(this).siblings(".mdi-eye").removeClass("mdi-eye").addClass("mdi-eye-off")):($(this).closest(".input-group").find("input[type=text]").prop("type","password"),$(this).siblings(".mdi-eye-off").removeClass("mdi-eye-off").addClass("mdi-eye"))}))})),$(".word-count").each((function(){$(this).closest(".form-group").find(".word-feedback").html($(this).val().length+"/"+$(this).prop("maxlength")),$(this).on("keydown",(function(){var e=$(this).val().length,t=$(this).prop("maxlength");$(this).closest(".form-group").find(".word-feedback").html(e+"/"+t)}))})),radioShow(),$(".radio-control > input[type=radio],.radio-control > input[type=checkbox]").on("change",(function(){radioShow()})),$(".check-all").each((function(){$(this).on("change",(function(){$(this).parent().closest(".check-all-label").next(".checkbox-group").find("input[type=checkbox]").prop("checked",$(this).prop("checked"))}))})),$(".checkbox-group input[type=checkbox]").on("change",(function(){var e=$(this).parents().closest(".checkbox-group").prev(".check-all-label").find(".check-all"),t=$(this).parent().closest(".checkbox-group").prev(".check-all-label").find(".check-all");$(this).is(":checked")?0==$(this).parent().closest(".checkbox-group").find("> label input[type=checkbox]:not(:checked)").length&&t.prop("checked","checked").trigger("change"):e.prop("checked",!1)})),$(".checkbox-group input[type=checkbox]").trigger("change"),$(window).width()<=600&&($(".header__item").on("show.bs.dropdown",(function(e){BNS.on()})),$(".header__item").on("hide.bs.dropdown",(function(e){BNS.off()})),$(window).on("scroll",(function(){$(window).scrollTop()>=56?$(".header").addClass("header-hide-top"):$("#sidebar-trigger").is(":checked")||$(".header__item").hasClass("open")||$(".calendar-container").hasClass("open")||$(".header").removeClass("header-hide-top")}))),$(".isolated-scroll").isolatedScroll(),$(window).width()<=menuSettings.breakpoint&&($("#sidebar-trigger").on("change",(function(){$(this).is(":checked")?BNS.on():BNS.off()})),$("#sidebar-right-trigger").on("change",(function(){$(this).is(":checked")?BNS.on():BNS.off()}))),$(".banner__overlay"),menuBannerScroll(),window.addEventListener("resize",(function(e){menu()})),menu(),window.onscroll=function(){$("#menu-trigger").is(":checked")||menuBannerScroll()},$(".menu__item").each((function(e,t){$(this).attr({style:"transition-delay:"+menuSettings.itemsAnimationDelay*(e+1)+"ms,"+menuSettings.itemsAnimationDelay*(e+1)+"ms;-webkit-transition-delay:"+menuSettings.itemsAnimationDelay*(e+1)+"ms,"+menuSettings.itemsAnimationDelay*(e+1)+"ms;"})})),$(".input-plus").each((function(){var e=$(this).find(".txt"),t=($(this).find(".ic-plus"),$(this).find(".ic-minus"));0==parseInt(e.html())&&(console.log("a"),t.attr("disabled","disabled"))})),$(".ic-plus").on("click",(function(){var e=$(this).parents().closest(".input-plus"),t=parseInt(e.find(".txt").attr("max"));e.find(".ic-minus").removeAttr("disabled","");var n=parseInt(e.find(".txt").html())+1;e.find(".txt").html(n),n==t&&$(this).attr("disabled","disabled")})),$(".ic-minus").on("click",(function(){var e=$(this).parents().closest(".input-plus");e.find(".ic-plus").removeAttr("disabled","");var t=parseInt(e.find(".txt").html())-1;e.find(".txt").html(t),0==t&&$(this).attr("disabled","disabled")}));var e={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};String.prototype.latinise=function(){return this.replace(/[^A-Za-z0-9\[\] ]/g,(function(t){return e[t]||t}))},$(".live-search-result > *").each((function(){$(this).attr("data-search-term",$(this).find(">span").text().trim().toLowerCase().latinise())})),$(".live-search-box").on("keyup",(function(){var e=$(this).parent().closest(".live-search-list");if($("[data-search-term] span > .highlight").contents().unwrap(),$.trim($(this).val()).length>0){var t=$(this).val(),n=new RegExp(t,"g");e.addClass("searching"),e.find(".show:not(.input-clear)").removeClass("show").removeClass("hightlight");var i=$(this).val().toLowerCase().latinise(),r=e.find("[data-search-term *='"+i+"']");0==r.length?($(this).addClass("no-result"),$(this).closest(".live-search-list").addClass("list-no-result")):($(this).removeClass("no-result"),$(this).closest(".live-search-list").removeClass("list-no-result")),r.parents().closest(".search-group").addClass("show"),r.parents(".live-search-result").addClass("show"),r.addClass("show"),r.find("span:not(.span-wrap)").each((function(){$(this).html($(this).text().replace(n,""+t+""))})),r.hasClass("search-group")&&r.find("[data-search-term]").addClass("show")}else $(this).siblings(".live-search-result-2").length>0&&$(this).addClass("no-result"),e.removeClass("searching"),$(this).closest(".live-search-list").removeClass("list-no-result"),e.find(".show").removeClass("show").removeClass("hightlight")})),$(".live-search-box").focusout((function(){$(this).siblings(".live-search-result-2").removeClass("show")})),$(".live-search-box").focus((function(){$(this).siblings(".live-search-result-2").find("li").hasClass("show")?$(this).siblings(".live-search-result-2").addClass("show"):$(this).siblings(".live-search-result-2").length>0&&$(this).addClass("no-result")})),$(".live-search-result li span").each((function(){$(this).on("mousedown touchstart",(function(){$(this).parent().closest(".live-search-list").find(".live-search-result").removeClass("show");var e=$(this).parent().closest(".live-search-list").find(".live-search-box");e.siblings(".input-clear").addClass("show"),e.val($(this).text())}))}))})),autosize(document.querySelectorAll(".textarea-autosize")),[].forEach.call(document.querySelectorAll(".textarea-autosize"),(function(e,t){e.addEventListener("autosize:resized",(function(){var t=parseInt(e.style.height);console.log(t),t>199?($(this).hasClass("input-material-2")&&($(this).css("padding-top","0"),$(this).parent(".input-material-2-wrap").css("padding-top","30px")),$(this).hasClass("input-material-3")&&$(this).parent(".input").css("padding-top","10px")):($(this).hasClass("input-material-2")&&($(this).parent(".input-material-2-wrap").css("padding-top",""),$(this).css("padding-top","")),$(this).hasClass("input-material-3")&&$(this).parent(".input").css("padding-top",""))}))})),$(document).ready((function(){$(".ripple-radio").ripple({maxDiameter:"230%"}),$(".ripple").ripple({}),$(".ripple-100").ripple({maxDiameter:"100%",touchDelay:150}),$(".prev").ripple()})),$((function(){var e={errorsContainer:function(e){return e.$element.parents().closest(".input-group").children(".errorBlock")}};$("form").each((function(){$(this).parsley(e)}))})),$(document).ready((function(){$(document).on("change","[data-parsley-id]",(function(){$(this).parsley().validate()})),$(".form-group .input-group").append('
        ')})),Parsley.addMessages("vi",{defaultMessage:"Nhập sai giá trị.",type:{email:"Email không hợp lệ.",url:"Đường dẫn không hợp lệ.",number:"Định dạng này phải là số.",integer:"Định dạng này phải là số.",digits:"Định dạng này phải là số.",alphanum:"Định dạng này phải là chữ.",password:"Mật khẩu phải bao gồm số và chữ cái"},notblank:"Trường bắt buộc.",required:"Trường bắt buộc.",pattern:"Nhập sai giá trị.",min:"Giá trị này phải lớn hơn hoặc bằng %s.",max:"Giá trị này phải nhỏ hơn hoặc bằng to %s.",range:"Giá trị phải nằm trong khoảng %s và %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same.",euvatin:"It's not a valid VAT Identification Number."}),Parsley.setLocale("vi"),$(document).on("show.bs.modal",".modal",(function(e){var t=1040+10*$(".modal:visible").length;$(this).css("z-index",t),setTimeout((function(){$(".modal-backdrop").not(".modal-stack").css("z-index",t-1).addClass("modal-stack")}),0)})),$(document).ready((function(){$("[data-tooltip]").tooltip(),$(".modal").on("show.bs.modal",(function(e){$("body").height()>$(window).height()?$("header").css("padding-right",getScrollbarWidth()):$("body").css("padding-right",0),$(window).width()<769&&($(window).scrollTop(),BNS.on())})),$(".modal").on("shown.bs.modal",(function(e){$("body").height()>$(window).height()&&($("header").css("padding-right",getScrollbarWidth()),$("body").css("padding-right",getScrollbarWidth())),$("body").css("overflow","hidden")})),$(".modal").on("hidden.bs.modal",(function(e){$(".modal").hasClass("show")?($("ldp-header").css("padding-right",getScrollbarWidth()),$("body").css("padding-right",getScrollbarWidth())):($(window).width()<769?BNS.off():$("body").css("overflow",""),$("body").css("padding-right",""),$("header").css("padding-right",""))})),$(document).on("click",".dropdown-click",(function(e){e.stopPropagation()})),$(".dropdown-notify").on("shown.bs.dropdown",(function(e){$(this).removeClass("active-nofify")}))})),$(document).ready((function(){$("[data-content]").on("change",(function(){$(this).closest("[data-accordion]").trigger("resize")})),$("[data-accordion]").accordion({transitionSpeed:200}),$("[data-accordion]").trigger("resize"),$(".sticky-menu [data-accordion]").on("accordion.close",(function(){setTimeout((function(){$(window).trigger("resize")}),10)})),$(".sticky-menu [data-accordion]").on("accordion.open",(function(){setTimeout((function(){$(window).trigger("resize")}),10)})),$(".accordion-snap [data-accordion]").on("accordion.close",(function(){$(this).find("[data-control]").get(0).getBoundingClientRect().y<0&&$("html,body").animate({scrollTop:$(this).offset().top-0},200)}))})),$(".light-pick-inline-container").each((function(e){$(this).attr("id","lpc"+e)}));var lp=[],lpr=[];function closeSelect(){$(".select-2").select2("close")}function select2_search(e){var t=$(".select2-container--open").siblings(".select-2[multiple]").data("select2").dropdown.$search||$(".select2-container--open").siblings(".select-2[multiple]").data("select2").selection.$search;t.val(e),t.trigger("keyup")}function deselectAll(){$(".select2-results__options").children(".select2-results__message").length>0&&closeSelect(),$(".select2-container--open").siblings(".select-2[multiple]").find("option").prop("selected",!1),$(".select2-container--open").siblings(".select-2[multiple]").find("option").find("option").prop("selected",!1),$(".select2-container--open").siblings(".select-2[multiple]").trigger("change"),$("li.select2-results__option").attr("aria-selected","false")}function countdown_otp(){var e=10,t=setInterval((function(){document.getElementById("countdown").innerHTML="Mã OTP sẽ hết hiệu lực sau "+e+" giây",(e-=1)<=0&&(clearInterval(t),document.getElementById("countdown").innerHTML='Nhận lại mã xác nhận')}),1e3)}[].forEach.call(document.querySelectorAll(".light-pick"),(function(e,t,n){var i=n[t].getAttribute("lpMindate")?n[t].getAttribute("lpMindate"):null,r=n[t].getAttribute("lpMaxdate")?n[t].getAttribute("lpMaxdate"):null,o=n[t].getAttribute("lpMaxdays")?n[t].getAttribute("lpMaxdays"):null,s=n[t].getAttribute("lpMindays")?n[t].getAttribute("lpMindays"):null,a=n[t].getAttribute("lpOrient")?n[t].getAttribute("lpOrient"):"auto";lpItem=new Lightpick({field:e,numberOfColumns:1,numberOfMonths:($(window).width(),1),autoclose:!0,minDate:n[t].getAttribute("lpMindate")?moment().subtract(i,"day"):null,maxDate:n[t].getAttribute("lpMaxdate")?moment().add(r,"day"):null,maxDays:o,minDays:s,orientation:a,dropdowns:{years:{min:moment().year()-10,max:moment().year()+1},months:!0},onOpen:function(){$($(this)[0]._opts.field).addClass("light-pick-focus"),console.log($(this)),$(window).width()<=480&&(BNS.on(),0==$($(this)[0].el).find(".lp-mobile-header").length&&$($(this)[0].el).prepend('
        '),$(".lp-backdrop").addClass("show"))},onSelect:function(){$($(this)[0]._opts.field).trigger("change")},onClose:function(){$($(this)[0]._opts.field).removeClass("light-pick-focus"),$(window).width()<=480&&(BNS.off(),$(".lp-backdrop").removeClass("show"))}}),lp.push(lpItem)})),[].forEach.call(document.querySelectorAll(".light-pick-inline"),(function(e){new Lightpick({field:e,numberOfColumns:1,numberOfMonths:($(window).width(),1),autoclose:!1,parentEl:"#"+$(e).parent().closest(".form-group").find(".light-pick-inline-container").attr("id"),inline:!0,hideOnBodyClick:!1,dropdowns:{months:!0,years:!0},onSelect:function(){$($(this)[0]._opts.field).trigger("change");var e=$(this)[0]._opts.startDate;$(this)[0].gotoDate(e)}})})),[].forEach.call(document.querySelectorAll(".light-pick-range"),(function(e,t,n){var i=n[t].getAttribute("lpMindate")?n[t].getAttribute("lpMindate"):null,r=n[t].getAttribute("lpMaxdate")?n[t].getAttribute("lpMaxdate"):null,o=n[t].getAttribute("lpMaxdays")?n[t].getAttribute("lpMaxdays"):null,s=n[t].getAttribute("lpMindays")?n[t].getAttribute("lpMindays"):null,a=n[t].getAttribute("lpOrient")?n[t].getAttribute("lpOrient"):"auto";lprItem=new Lightpick({field:e,singleDate:!1,numberOfColumns:2,numberOfMonths:$(window).width()>768?2:1,footer:($(window).width(),!1),minDate:n[t].getAttribute("lpMindate")?moment().subtract(i,"day"):null,maxDate:n[t].getAttribute("lpMaxdate")?moment().add(r,"day"):null,maxDays:o,minDays:s,orientation:a,dropdowns:{years:{min:moment().year()-10,max:moment().year()+1},months:!0},locale:{buttons:{prev:"",next:"",close:"",reset:"Khôi phục",apply:"Áp dụng"},tooltip:{one:"ngày",other:"ngày"},tooltipOnDisabled:null,pluralize:function(e,t){return"string"==typeof e&&(e=parseInt(e,10)),1===e&&"one"in t?t.one:"other"in t?t.other:""}},onSelect:function(){$($(this)[0].el).find(".lp-mobile-header-range").html($(this)[0].toString($(this)[0]._opts.format)),$($(this)[0]._opts.field).trigger("change")},onOpen:function(){$($(this)[0]._opts.field).addClass("light-pick-focus"),$(window).width()<=480&&(BNS.on(),console.log($(this)[0]),$($(this)[0].el).addClass("light-pick-range"),0==$($(this)[0].el).find(".lp-mobile-header").length&&$($(this)[0].el).prepend('
        Từ - Đến
        '),$(".lp-backdrop").addClass("show"))},onClose:function(){$($(this)[0]._opts.field).removeClass("light-pick-focus"),$(window).width()<=480&&(BNS.off(),$(".lp-backdrop").removeClass("show"))}}),lpr.push(lprItem)})),$(document).ready((function(){$(window).width()<=480?$("body").has(".light-pick")&&$("body").append(''):$(".lightpick:not(.is-hidden)")})),$(document).ready((function(){var e;$(document).on("focus",".select2.select2-container",(function(e){e.originalEvent&&$(this).find(".select2-selection--single").length>0&&$(this).siblings("select:enabled").select2("open")})),$(window).width()<=767&&$("body .select-2").hasClass("select-2")&&$("body").append('
        '),$(".select-2-backdrop").on("click",(function(){$(".select-2").select2("close")})),$(".select-2:not([multiple])").select2({width:"100%",closeOnSelect:!($(window).width()<768)}).on("select2:opening",(function(){$(window).width()<=767&&(BNS.off(),clearTimeout(e))})).on("select2:open",(function(){if($(".select2-search--dropdown .select2-search__field").attr("placeholder","Tìm kiếm..."),$(window).width()>=789&&(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>-1)&&$(".select2-search input").prop("focus",!1),$(window).width()<789&&$(".select2-search input").prop("focus",!1),$(window).width()<=767){clearTimeout(e),BNS.on(),$(".close-select").remove();var t=$(this).eq(0).attr("header-text");$("body > .select2-container .select2-dropdown").prepend('
        Đóng
        '+t+"
        "),$("body > .select2-container .select2-dropdown").addClass("top-0"),$(".select-2-backdrop").addClass("show")}})).on("select2:closing",(function(){$(".select-2-backdrop").removeClass("show"),$(window).width()<=767&&(BNS.off(),$("body > .select2-container .select2-dropdown").removeClass("top-0"))})).on("select2:select",(function(){$(window).width()<=767&&($(".select-2-backdrop").removeClass("show"),$("body > .select2-container .select2-dropdown").removeClass("top-0"),e=setTimeout((function(){$(".select-2").select2("close")}),320))})),$(".select-2[multiple]").select2({width:"100%",closeOnSelect:!1}).on("select2:opening",(function(){$(window).width()<=767&&(BNS.off(),clearTimeout(e))})).on("select2:open",(function(){if($(".select2-search--dropdown .select2-search__field").attr("placeholder","Tìm kiếm..."),$(window).width()<789&&$(".select2-search input").prop("focus",!1),$(window).width()<=767){clearTimeout(e),BNS.on(),$(".close-select").remove(),$(".unselect-all").remove(),$(".select2-search-container").remove();var t=$(this).eq(0).attr("header-text");$("body > .select2-container .select2-dropdown").prepend('
        Đóng
        '+t+'
        Bỏ chọn tất cả
        '),$("body > .select2-container .select2-dropdown").addClass("top-0"),$(".select-2-backdrop").addClass("show"),$("#select-2-search-multiple").keyup((function(){console.log("a"),select2_search($("#select-2-search-multiple").val())}))}})).on("select2:closing",(function(){$(".select-2-backdrop").removeClass("show"),$(window).width()<=767&&(BNS.off(),$("body > .select2-container .select2-dropdown").removeClass("top-0"))}))})),$(document).ready((function(){".cleave-birthday".length&&($(".cleave-birthday").toArray().forEach((function(e){new Cleave(e,{date:!0,datePattern:["d","m","Y"]})})),$(".cleave-number").toArray().forEach((function(e){new Cleave(e,{numeral:!0,numeralThousandsGroupStyle:"thousand"})})))})),$(document).ready((function(){new Swiper(".swiper-1",{navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"}}),new Swiper(".swiper-4",{slidesPerView:4,spaceBetween:15,navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"},breakpoints:{480:{slidesPerView:1,spaceBetween:10},768:{slidesPerView:2,spaceBetween:15}}})})),$(document).ready((function(){if(null!=document.getElementById("p-upload-crop")){var e,t=document.getElementById("p-upload-crop");e=new Croppie(t,{enableExif:!0,viewport:{width:200,height:200,type:"circle"},boundary:{width:"100%",height:300}}),document.getElementById("p-upload").onchange=function(){!function(t){if(t.files&&t.files[0]){var n=new FileReader;n.onload=function(t){e.bind({url:t.target.result}),$("#modal-profile").modal("show")},n.readAsDataURL(t.files[0])}else swal("Sorry - you're browser doesn't support the FileReader API")}(this)},$("#get-cropped").on("click",(function(){e.result({type:"base64",format:"png"}).then((function(e){}))}))}var n;if(window.location.href.indexOf("html-vip")>0&&($("head").append(''),$('[src*="/primary"]').each((function(){$(this).attr("src","vip/vip-"+$(this).attr("src"))})),$('[src*="banner"]').each((function(){$(this).attr("src","vip/vip-"+$(this).attr("src"))})),$('[src*="logo-white-type-2.svg"]').each((function(){$(this).attr("src","vip/vip-"+$(this).attr("src"))}))),$(".steps").each((function(){var e=$(this).find(".steps__item").length,t=$(this).find(".steps__item--active"),n=t.length;$(t).eq(n-1).addClass("steps__item--active--last");var i=100/(e-1)*(n-1);console.log($(t).eq(n)),$(this).find(".steps__progress").css("width",i+"%")})),$(".table-wraper-size").scroll((function(e){this.scrollWidth===this.scrollLeft+this.clientWidth?$(this).parent(".table-wraper-inner").addClass("right-none"):$(this).parent(".table-wraper-inner").removeClass("right-none"),0===this.scrollLeft?$(this).parent(".table-wraper-inner").addClass("left-none"):$(this).parent(".table-wraper-inner").removeClass("left-none")})).scroll(),0==deviceIsMobile&&$("body").addClass("no-touch"),1==deviceIsMobile&&$(".bg").css("min-height",$(window).height()+100),$(window).width()<769&&new Swiper(".swiper-fav",{slidesPerView:"auto",navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"}}),new Swiper(".swiper-fav-sticky",{slidesPerView:"auto",watchOverflow:!0,navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"}}),new Swiper(".swiper-login",{spaceBetween:30,autoplay:{delay:7e3},navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"},pagination:{el:".swiper-pagination",type:"bullets"}}),new Swiper(".swiper-km-big",{spaceBetween:30,autoplay:{delay:5e3},navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"},pagination:{el:".swiper-pagination",type:"bullets",clickable:!0}}),new Swiper(".swiper-3-it",{spaceBetween:10,slidesPerView:3,navigation:{nextEl:".swiper-3-it ~ .swiper-next",prevEl:".swiper-3-it ~ .swiper-prev"},breakpoints:{640:{slidesPerView:"auto"}}}),$("body").has(".main .fav-inner").length>0){var i;function r(){$(".main .fav-inner").length&&(i=$(window).width()>768?$(".main .fav-inner").offset().top+$(".main .fav-inner").height()-120:$(".main .fav-inner").offset().top)}$(window).resize((function(){r()})),$((function(){r(),$(window).scroll((function(){$(window).scrollTop()>=i?$(".fav--sticky").addClass("sticky-fav"):$(".fav--sticky").removeClass("sticky-fav")}))})),$((function(){$(window).scroll((function(){var e=$(window).scrollTop();e>=16?$(".menu").addClass("menu--sticky"):$(".menu").removeClass("menu--sticky"),$(window).width()>=1200&&(e>=16?($(".search").addClass("search--sticky"),$(".fav--sticky").addClass("fav--sticky-top")):$(".fav--sticky").removeClass("fav--sticky-top"))}))}))}else $(".fav--sticky").addClass("sticky-fav"),$(window).scroll((function(){$(window).width()>=1200&&($(window).scrollTop()>=16?$(".menu").addClass("menu--sticky"):$(".menu").removeClass("menu--sticky"))}));function o(e){return e.id?$('
        '+e.text+'
        '+e.element.attributes.datainfo.value+"
        "):e.text}function s(e){return e.id?$('
        '+e.text+"
        "):e.text}iOS()&&$("#search").focus((function(){window.scrollTo({top:0,behavior:"smooth"})})),$(window).width()<1200&&$("#sidebar1").prop("checked",!0),$("input[type=radio][showFor]").on("change",(function(){$("input[type=radio][showFor]").each((function(){name=$(this).attr("name"),idShow=$($(this).attr("showFor")),idShow.addClass("hidden"),$(this).is(":checked")?idShow.removeClass("hidden"):idShow.addClass("hidden")}))})),$("input[type=radio][showFor]").trigger("change"),$(".select-2-template-cf").select2({templateResult:o,templateSelection:o}),$(".select-2-template-img").select2({templateResult:s,templateSelection:s}),$(".modal--countdown").on("shown.bs.modal",(function(){$(".modal-countdown-txt").html("3"),n=setInterval((function(){countdownNum=$(".modal-countdown-txt").html(),$(".modal-countdown-txt").html(countdownNum-1),1==countdownNum&&$(".modal--countdown").modal("hide"),countdownNum<=0&&(clearInterval(n),$(".modal-countdown-txt").html("3"))}),1e3)})).on("hidden.bs.modal",(function(){$(".modal-countdown-txt").html("3"),clearInterval(n)})),$('[data-toggle="popover"]').popover({trigger:"focus",html:!0}),$(".list-radio-modal-close").find("input").on("click",(function(){$(this).closest(".modal").modal("hide")})),$(".cleave-custom-date").toArray().forEach((function(e){new Cleave(e,{delimiter:"/",blocks:[2,2,4],uppercase:!0})})),$("[data-tooltip-m]").tooltip({template:''})}));var ChuSo=new Array(" không "," một "," hai "," ba "," bốn "," năm "," sáu "," bảy "," tám "," chín "),Tien=new Array(""," nghìn"," triệu"," tỷ"," nghìn tỷ"," triệu tỷ"),VCB_MONEY={space:" ",lang:"vi",currency:"VND",LANG_MAP:{vi:{currency:{VND:"đồng",USD:"đô la mỹ",EUR:"euro"},comma:"phẩy",invalid_number:"Số không hợp lệ",zero:"không",one:"mốt",four:"tư",five:"lăm",quadrillion:"triệu tỷ",trillion:"nghìn tỷ",billion:"tỷ",million:"triệu",thousand:"nghìn",hundred:"trăm",hundred_vi:"trăm linh",ones:["không","một","hai","ba","bốn","năm","sáu","bảy","tám","chín"],tens:["","","hai mươi","ba mươi","bốn mươi","năm mươi","sáu mươi","bảy mươi","tám mươi","chín mươi"],teens:["mười","mười một","mười hai","mười ba","mười bốn","mười lăm","mười sáu","mười bảy","mười tám","mười chín"]},en:{comma:"and",invalid_number:"Invalid Number",zero:"zero",quadrillion:"quadrillion",trillion:"trillion",billion:"billion",million:"million",thousand:"thousand",hundred:"hundred ",ones:["zero","one","two","three","four","five","six","seven","eight","nine"],tens:["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"],teens:["ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"]}},setLang:function(e){VCB_MONEY.lang=e},setCurrency:function(e){VCB_MONEY.currency=e},convert_quadrillions:function(e){var t=parseInt(e);if(e>=1e15){var n=Math.floor(t/1e15),i=e.toString().slice(e.length-15);return VCB_MONEY.convert_quadrillions(n.toString())+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].quadrillion+VCB_MONEY.space+(i>0?VCB_MONEY.convert_trillions(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_trillions(e)+VCB_MONEY.space},convert_trillions:function(e){var t=parseInt(e);if(e>=1e12){var n=Math.floor(t/1e12),i=e.toString().slice(e.length-12);return VCB_MONEY.convert_trillions(n.toString())+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].trillion+VCB_MONEY.space+(i>0?VCB_MONEY.convert_billions(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_billions(e)+VCB_MONEY.space},convert_billions:function(e){var t=parseInt(e);if(e>=1e9){var n=Math.floor(t/1e9),i=e.toString().slice(e.length-9);return VCB_MONEY.convert_billions(n.toString())+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].billion+VCB_MONEY.space+(i>0?VCB_MONEY.convert_millions(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_millions(e)+VCB_MONEY.space},convert_millions:function(e){var t=parseInt(e);if(e>=1e6){var n=Math.floor(t/1e6),i=e&&e.slice(e.length-6);return VCB_MONEY.convert_millions(n.toString())+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].million+VCB_MONEY.space+(i>0?VCB_MONEY.convert_thousands(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_thousands(e)+VCB_MONEY.space},convert_thousands:function(e){var t=parseInt(e);if(t>=1e3){var n=Math.floor(t/1e3),i=e&&e.slice(e.length-3);return VCB_MONEY.convert_hundreds(n.toString())+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].thousand+VCB_MONEY.space+(i>0?VCB_MONEY.convert_hundreds(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_hundreds(e)+VCB_MONEY.space},convert_hundreds:function(e){var t=parseInt(e);if("vi"===VCB_MONEY.lang){if(e.length>2){var n=Math.floor(t/100);return(i=e&&e.slice(e.length-2)).search(/^0[1-9]/)>=0?VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[n]+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].hundred_vi+VCB_MONEY.space+(i>0?VCB_MONEY.convert_tens(i):"")+VCB_MONEY.space:VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[n]+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].hundred+VCB_MONEY.space+(i>0?VCB_MONEY.convert_tens(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_tens(e)+VCB_MONEY.space}if(t>99){n=Math.floor(t/100);var i=e&&e.slice(e.length-2);return VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[n]+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].hundred+VCB_MONEY.space+(i>0?VCB_MONEY.convert_tens(i):"")+VCB_MONEY.space}return VCB_MONEY.convert_tens(e)+VCB_MONEY.space},convert_tens:function(e,t){var n=parseInt(e),i=Math.floor(n/10),r=e&&e.slice(e.length-1);if(n<10)return!0===t?e.search(/^0\d/)>=0?VCB_MONEY.LANG_MAP[VCB_MONEY.lang].zero+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[n]+VCB_MONEY.space:VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[n]+VCB_MONEY.space:VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[n]+VCB_MONEY.space;if(n>=10&&n<20)return VCB_MONEY.LANG_MAP[VCB_MONEY.lang].teens[n-10]+VCB_MONEY.space;if("vi"===VCB_MONEY.lang){if("1"===r)return VCB_MONEY.LANG_MAP[VCB_MONEY.lang].tens[i]+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].one+VCB_MONEY.space;if("4"===r)return VCB_MONEY.LANG_MAP[VCB_MONEY.lang].tens[i]+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].four+VCB_MONEY.space;if("5"===r)return VCB_MONEY.LANG_MAP[VCB_MONEY.lang].tens[i]+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].five+VCB_MONEY.space}return VCB_MONEY.LANG_MAP[VCB_MONEY.lang].tens[i]+VCB_MONEY.space+(r>0?VCB_MONEY.LANG_MAP[VCB_MONEY.lang].ones[r]:"")+VCB_MONEY.space},convert_currency:function(e,t){return"vi"===VCB_MONEY.lang?VCB_MONEY.LANG_MAP[VCB_MONEY.lang].currency[VCB_MONEY.currency]:!0===e?t?"cents":"cent":"VND"===VCB_MONEY.currency?"dong":VCB_MONEY.currency.toLowerCase()},moneyToWords:function(e,t){try{var n;if(e=e&&e.toString().replace(/\,/gi,""),t&&(VCB_MONEY.currency=t),e.toString().indexOf(".")>=0){if(e=e.toString().split("."),Array.isArray(e)){if(!e[0])return;var i=parseInt(e[1].slice(0,2))>1;n="vi"===VCB_MONEY.lang?VCB_MONEY.convert_quadrillions(e[0])+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].comma+VCB_MONEY.space+(""!==e[1]?VCB_MONEY.convert_tens(e[1].slice(0,2),!0)+VCB_MONEY.space+VCB_MONEY.convert_currency(!0,i):""):VCB_MONEY.convert_quadrillions(e[0])+VCB_MONEY.space+VCB_MONEY.convert_currency()+VCB_MONEY.space+VCB_MONEY.LANG_MAP[VCB_MONEY.lang].comma+VCB_MONEY.space+(""!==e[1]?VCB_MONEY.convert_tens(e[1].slice(0,2),!0)+VCB_MONEY.space+VCB_MONEY.convert_currency(!0,i):"")}}else n=VCB_MONEY.convert_quadrillions(e)+VCB_MONEY.convert_currency();return n?(n=n.trim().replace(/\s+/gi," ")).toUpperCase().charAt(0)+n.slice(1):VCB_MONEY.LANG_MAP[VCB_MONEY.lang].invalid_number}catch(r){console.error(r)}}};function DocSo3ChuSo(e){var t,n,i,r="";if(t=parseInt(e/100),n=parseInt(e%100/10),i=e%10,0==t&&0==n&&0==i)return"";switch(0!=t&&(r+=ChuSo[t]+" trăm ",0==n&&0!=i&&(r+=" linh ")),0!=n&&1!=n&&(r+=ChuSo[n]+" mươi",0==n&&0!=i&&(r+=" linh ")),1==n&&(r+=" mười "),i){case 1:r+=0!=n&&1!=n?" mốt ":ChuSo[i];break;case 5:r+=0==n?ChuSo[i]:" lăm ";break;default:0!=i&&(r+=ChuSo[i])}return r}var mangso=["không","một","hai","ba","bốn","năm","sáu","bảy","tám","chín"];function dochangchuc(e,t){var n="";return chuc=Math.floor(e/10),donvi=e%10,chuc>1?(n=" "+mangso[chuc]+" mươi",1==donvi&&(n+=" mốt")):1==chuc?(n=" mười",1==donvi&&(n+=" một")):t&&donvi>0&&(n=" lẻ"),5==donvi&&chuc>=1?n+=" lăm":(donvi>1||1==donvi&&0==chuc)&&(n+=" "+mangso[donvi]),n}function docblock(e,t){var n="";return tram=Math.floor(e/100),e%=100,t||tram>0?(n=" "+mangso[tram]+" trăm",n+=dochangchuc(e,!0)):n=dochangchuc(e,!1),n}function dochangtrieu(e,t){var n="";return trieu=Math.floor(e/1e6),e%=1e6,trieu>0&&(n=docblock(trieu,t)+" triệu",t=!0),nghin=Math.floor(e/1e3),e%=1e3,nghin>0&&(n+=docblock(nghin,t)+" nghìn",t=!0),e>0&&(n+=docblock(e,t)),n}function DocTienBangChu(e){if(0==(e=e.replace(/,/g,"")))return mangso[0];var t="",n="";do{ty=e%1e9,t=(e=Math.floor(e/1e9))>0?dochangtrieu(ty,!0)+n+t:dochangtrieu(ty,!1)+n+t,n=" tỷ"}while(e>0);return(t+=" đồng").charAt(1).toUpperCase()+t.slice(2)}function DocTienBangChuNgoaite(e){if(0==e)return mangso[0];var t="",n="";do{ty=e%1e9,t=(e=Math.floor(e/1e9))>0?dochangtrieu(ty,!0)+n+t:dochangtrieu(ty,!1)+n+t,n=" tỷ"}while(e>0);return t.charAt(1).toUpperCase()+t.slice(2)}function DocTienBangChuTheoLoaiTien(e,t){var n="",i=0,r="";if(0==e)return(n=mangso[0]).charAt(0).toUpperCase()+n.slice(1);if(e.toString().indexOf(".")>-1){let t=e.toString().split(".");e=parseInt(t[0],10),i=parseInt(t[1].slice(0,2),10)}if(0!==e)do{ty=e%1e9,n=(e=Math.floor(e/1e9))>0?dochangtrieu(ty,!0)+r+n:dochangtrieu(ty,!1)+r+n,r=" tỷ"}while(e>0);else n=mangso[0];if(i>0&&(n+=" phẩy ",n+=dochangchuc(i,!1)),t)switch(t){case"VND":n+=" đồng";break;case"USD":n+=" đô la mỹ";break;case"EUR":n+=" euro"}return n.trim().charAt(0).toUpperCase()+n.trim().slice(1)}function DocTienBangChu_BK(e){var t=0,n=0,i="",r="",o=new Array;if(e<0)return"Số tiền âm !";if(0==e)return"Không";if(n=e>0?e:-e,e>8999999999999999)return"Số quá lớn!";for(o[5]=Math.floor(n/1e15),isNaN(o[5])&&(o[5]="0"),n-=1e15*parseFloat(o[5].toString()),o[4]=Math.floor(n/1e12),isNaN(o[4])&&(o[4]="0"),n-=1e12*parseFloat(o[4].toString()),o[3]=Math.floor(n/1e9),isNaN(o[3])&&(o[3]="0"),n-=1e9*parseFloat(o[3].toString()),o[2]=parseInt(n/1e6),isNaN(o[2])&&(o[2]="0"),o[1]=parseInt(n%1e6/1e3),isNaN(o[1])&&(o[1]="0"),o[0]=parseInt(n%1e3),isNaN(o[0])&&(o[0]="0"),t=o[5]>0?5:o[4]>0?4:o[3]>0?3:o[2]>0?2:o[1]>0?1:0;t>=0;t--)i+=r=DocSo3ChuSo(o[t]),o[t]>0&&(i+=Tien[t]),t>0&&r.length>0&&(i+=",");return","==i.substring(i.length-1)&&(i=i.substring(0,i.length-1)),(i=i.substring(1,2).toUpperCase()+i.substring(2)).replace(/ /g," ")}function latinise(e){var t={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e.replace(/[^A-Za-z0-9\[\] ]/g,(function(e){return t[e]||e}))}var a=["","one ","two ","three ","four ","five ","six ","seven ","eight ","nine ","ten ","eleven ","twelve ","thirteen ","fourteen ","fifteen ","sixteen ","seventeen ","eighteen ","nineteen "],b=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function NumberInWords(e){if((e=(e=e.toString().replace(/,/g,"")).toString()).length>9)return"overflow";if(n=("000000000"+e).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/),n){var t="";return t+=0!=n[1]?(a[Number(n[1])]||b[n[1][0]]+" "+a[n[1][1]])+"crore ":"",t+=0!=n[2]?(a[Number(n[2])]||b[n[2][0]]+" "+a[n[2][1]])+"lakh ":"",t+=0!=n[3]?(a[Number(n[3])]||b[n[3][0]]+" "+a[n[3][1]])+"thousand ":"",(t+=0!=n[4]?(a[Number(n[4])]||b[n[4][0]]+" "+a[n[4][1]])+"hundred ":"")+(0!=n[5]?(""!=t?"and ":"")+(a[Number(n[5])]||b[n[5][0]]+" "+a[n[5][1]])+"only ":"")}}function ChanKyTuDacBiet(e,t){var n=["0","1","2","3","4","5","6","7","8","9","q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","đ","Đ","e","é","è","ẹ","ẻ","ẽ","E","É","È","Ẹ","Ẻ","Ẽ","ê","ế","ề","ệ","ể","ễ","Ê","Ế","Ề","Ệ","Ể","Ễ","u","ú","ù","ụ","ủ","ũ","U","Ú","Ù","Ụ","Ủ","Ũ","ư","ứ","ừ","ự","ử","ữ","Ư","Ứ","Ừ","Ự","Ử","Ữ","o","ó","ò","ọ","ỏ","õ","O","Ó","Ò","Ọ","Ỏ","Õ","ô","ố","ồ","ộ","ổ","ỗ","Ô","Ố","Ồ","Ộ","Ổ","Ỗ","ơ","ớ","ờ","ợ","ở","ỡ","Ơ","Ớ","Ờ","Ợ","Ở","Ỡ","a","á","à","ạ","ả","ã","A","Á","À","Ạ","Ả","Ã","ă","ắ","ằ","ặ","ẳ","ẵ","Ă","Ắ","Ằ","Ặ","Ẳ","Ẵ","â","ấ","ầ","ậ","ẩ","ẫ","Â","Ấ","Ầ","Ậ","Ẩ","Ẫ","·"];let i="";for(var r=0;r=0||t.indexOf(e[r])>=0)&&(i+=e[r]);return i}function ConvertKhongDau(e){let t=e;return t=t.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a"),t=t.replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g,"A"),t=t.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e"),t=t.replace(/E|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g,"E"),t=t.replace(/ì|í|ị|ỉ|ĩ/g,"i"),t=t.replace(/Ì|Í|Ị|Ỉ|Ĩ/g,"I"),t=t.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o"),t=t.replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g,"O"),t=t.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u"),t=t.replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g,"U"),t=t.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y"),t=t.replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g,"Y"),t=t.replace(/đ/g,"d"),t=t.replace(/Đ/g,"D"),t=t.replace(/^\-+|\-+$/g,""),t}